]> git.baikalelectronics.ru Git - kernel.git/commit
wwan: iosm: use a flexible array rather than allocate short objects
authorJakub Kicinski <kuba@kernel.org>
Fri, 20 May 2022 06:00:13 +0000 (23:00 -0700)
committerJakub Kicinski <kuba@kernel.org>
Sat, 21 May 2022 00:56:50 +0000 (17:56 -0700)
commitc1d516b40f98514c0d4ee641704cdd2a1a231bcc
tree221d23653a39be1e2f3862ce9bb390eefbde206f
parentad816a158da8323d55e6f18727a0160806a90296
wwan: iosm: use a flexible array rather than allocate short objects

GCC array-bounds warns that ipc_coredump_get_list() under-allocates
the size of struct iosm_cd_table *cd_table.

This is avoidable - we just need a flexible array. Nothing calls
sizeof() on struct iosm_cd_list or anything that contains it.

Reviewed-by: M Chetan Kumar <m.chetan.kumar@intel.com>
Link: https://lore.kernel.org/r/20220520060013.2309497-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/wwan/iosm/iosm_ipc_coredump.h