Skip to content
Commit df3dc0ef authored by Dave Martin's avatar Dave Martin Committed by Borislav Petkov (AMD)
Browse files

x86/resctrl: Prefer alloc(sizeof(*foo)) idiom in rdt_init_fs_context()



rdt_init_fs_context() sizes a typed allocation using an explicit
sizeof(type) expression, which checkpatch.pl complains about.

Since this code is about to be factored out and made generic, this
is a good opportunity to fix the code to size the allocation based
on the target pointer instead, to reduce the chance of future mis-
maintenance.

Fix it.

No functional change.

Signed-off-by: default avatarDave Martin <Dave.Martin@arm.com>
Signed-off-by: James Morse's avatarJames Morse <james.morse@arm.com>
Signed-off-by: default avatarBorislav Petkov (AMD) <bp@alien8.de>
Reviewed-by: default avatarFenghua Yu <fenghuay@nvidia.com>
Reviewed-by: default avatarReinette Chatre <reinette.chatre@intel.com>
Tested-by: default avatarFenghua Yu <fenghuay@nvidia.com>
Tested-by: default avatarPeter Newman <peternewman@google.com>
Tested-by: TANSHP's avatarShaopeng Tan <tan.shaopeng@jp.fujitsu.com>
Tested-by: Amit Singh Tomar <amitsinght@marvell.com> # arm64
Tested-by: Shanker Donthineni <sdonthineni@nvidia.com> # arm64
Tested-by: default avatarBabu Moger <babu.moger@amd.com>
Tested-by: default avatarTony Luck <tony.luck@intel.com>
Link: https://lore.kernel.org/20250515165855.31452-22-james.morse@arm.com
parent 556f48a5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment