RE: [PATCH v2 04/16] x86/mce/amd: Put list_head in threshold_bank
From: Zhuo, Qiuxu
Date: Mon Feb 17 2025 - 20:28:35 EST
> From: Yazen Ghannam <yazen.ghannam@xxxxxxx>
> Sent: Friday, February 14, 2025 12:46 AM
> To: x86@xxxxxxxxxx; Luck, Tony <tony.luck@xxxxxxxxx>
> Cc: linux-kernel@xxxxxxxxxxxxxxx; linux-edac@xxxxxxxxxxxxxxx;
> Smita.KoralahalliChannabasappa@xxxxxxx; Yazen Ghannam
> <yazen.ghannam@xxxxxxx>
> Subject: [PATCH v2 04/16] x86/mce/amd: Put list_head in threshold_bank
>
> The threshold_bank structure is a container for one or more threshold_block
> structures. Currently, the container has a single pointer to the 'first'
> threshold_block structure which then has a linked list of the remaining
> threshold_block structures.
>
> This results in an extra level of indirection where the 'first' block is checked
> before iterating over the remaining blocks.
>
> Remove the indirection by including the head of the block list in the
> threshold_bank structure which already acts as a container for all the bank's
> thresholding blocks.
>
> Signed-off-by: Yazen Ghannam <yazen.ghannam@xxxxxxx>
Nice cleanup.
Reviewed-by: Qiuxu Zhuo <qiuxu.zhuo@xxxxxxxxx>