mirror-linux/drivers/mtd/chips
Rahul Kumar 5276688688 mtd: jedec_probe: use struct_size() helper for cfiq allocation
Documentation/process/deprecated.rst recommends against performing
dynamic size calculations in the arguments of memory allocator
functions due to the risk of overflow. Such calculations can wrap
around and result in a smaller allocation than expected.

Replace the size calculation in cfiq allocation with struct_size()
helper to make the code clearer and handle overflows correctly.

Signed-off-by: Rahul Kumar <rk0006818@gmail.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
2025-09-29 18:01:43 +02:00
..
Kconfig mtd: fixup CFI on ixp4xx 2021-10-15 12:27:10 +02:00
Makefile
cfi_cmdset_0001.c mtd: cfi_cmdset_0001: Byte swap OTP info 2023-10-27 19:45:11 +02:00
cfi_cmdset_0002.c mtd: cfi_cmdset_0002: remove redundant assignment to variable ret 2024-10-21 11:57:43 +02:00
cfi_cmdset_0020.c mtd: add missing MODULE_DESCRIPTION() macros 2024-07-01 11:56:28 +02:00
cfi_probe.c mtd: cfi: use struct_size() helper for cfiq allocation 2025-09-29 18:01:32 +02:00
cfi_util.c mtd: add missing MODULE_DESCRIPTION() macros 2024-07-01 11:56:28 +02:00
chipreg.c mtd: Convert list_for_each to entry variant 2021-06-11 21:05:06 +02:00
fwh_lock.h
gen_probe.c mtd: chips: Use SPDX license headers 2023-06-09 17:27:11 +02:00
jedec_probe.c mtd: jedec_probe: use struct_size() helper for cfiq allocation 2025-09-29 18:01:43 +02:00
map_absent.c
map_ram.c mtd: map_ram: prevent use of point and unpoint when NO_XIP is set 2023-09-22 16:33:34 +02:00
map_rom.c mtd: chips: Use SPDX license headers 2023-06-09 17:27:11 +02:00