]> git.ipfire.org Git - thirdparty/linux.git/commit
platform/x86: panasonic-laptop: simplify allocation of sinf
authorRosen Penev <rosenp@gmail.com>
Thu, 30 Apr 2026 22:15:55 +0000 (15:15 -0700)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Mon, 11 May 2026 16:20:54 +0000 (19:20 +0300)
commita3d0dbd18ce908292607bb6cf37c978ece8a33d4
tree61dd45764c0e7dcdd0b8ba93c0676fcee51553c4
parent18bc6ce6bb618e1dff4473d7dd528d22519abbd7
platform/x86: panasonic-laptop: simplify allocation of sinf

Change to a flexible array member to allocate once instead of twice.

Use __counted_by for extra runtime analysis. Move the counting
variable assignment to right after allocation as done by
kzalloc_flex for GCC 15 and above.

Remove + 1 to allocation. It's already done in the previous line.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://patch.msgid.link/20260430221555.83351-1-rosenp@gmail.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
drivers/platform/x86/panasonic-laptop.c