]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
EDAC/sb: Use kzalloc_flex()
authorRosen Penev <rosenp@gmail.com>
Fri, 13 Mar 2026 21:56:37 +0000 (14:56 -0700)
committerTony Luck <tony.luck@intel.com>
Fri, 13 Mar 2026 22:04:33 +0000 (15:04 -0700)
commitf42f3076dd9d2cd1bde6abc44e45478fad8a1a54
tree6d8dd1078cbfc0cdc3126281323858899a320502
parent7cbea96f6660786158ed7dc81fe40273d860355b
EDAC/sb: Use kzalloc_flex()

Simplifies allocations by using a flexible array member in this struct.

Add __counted_by to get extra runtime analysis. Move counting variable
assignment immediately after allocation as required by __counted_by.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Reviewed-by: Qiuxu Zhuo <qiuxu.zhuo@intel.com>
Link: https://patch.msgid.link/20260313215637.6371-1-rosenp@gmail.com
drivers/edac/sb_edac.c