]> git.ipfire.org Git - thirdparty/linux.git/commit
platform/x86/intel/vsec: allocate res with intel_vsec_dev
authorRosen Penev <rosenp@gmail.com>
Thu, 30 Apr 2026 22:43:07 +0000 (15:43 -0700)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Mon, 11 May 2026 16:22:22 +0000 (19:22 +0300)
commit8ef6b01cee44803691c0a0c95b36f8ec710e2afb
treec68f556e83277b3bb1258673595a8576444aaa6b
parenta3d0dbd18ce908292607bb6cf37c978ece8a33d4
platform/x86/intel/vsec: allocate res with intel_vsec_dev

Use a flexible array member to combine allocations. Avoids having to
free separately.

Add __counted_by for extra runtime analysis.

Move counting variable assignment to after allocations as is already
done by kzalloc_flex for GCC 15 and above.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Tested-by: David E. Box <david.e.box@linux.intel.com>
Reviewed-by: David E. Box <david.e.box@linux.intel.com>
Link: https://patch.msgid.link/20260430224307.109311-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/intel/vsec.c
drivers/platform/x86/intel/vsec_tpmi.c
include/linux/intel_vsec.h