linux/drivers/mtd
Kees Cook 3a2c4d55e3 treewide: refresh kmalloc_obj() conversions
This is another run of the Coccinelle script for converting kmalloc()
family of allocations to kmalloc_obj() via the existing rules in
scripts/coccinelle/api/kmalloc_objs.cocci

This catches both the set of kmalloc() uses added since the first
kmalloc_obj() conversions in v7.0 and adds a large group missed in the
first pass due to Coccinelle not interacting well with the cleanup.h
scoped_...() family of macros[1]. I worked around this with spatch's
"--macro-file" argument to a file with all the scoped_...() macros mapped
to Coccinelle's YACFE_ITERATOR[2] as that was the closest viable control
flow indicator I could find.

Build tested allmodconfig on x86, arm64, arm, loongarch, mips, powerpc,
riscv, and s390 with no new warnings.

Link: https://lore.kernel.org/lkml/202609021314.8A9C0B8@keescook/ [1]
Link: https://github.com/coccinelle/coccinelle/blob/master/standard.h [2]
Signed-off-by: Kees Cook <kees+treewide@kernel.org>
2026-09-04 21:37:00 -07:00
..
chips mtd: cfi_cmdset_0001: silence spurious suspend warning on shutdown 2026-06-29 16:37:03 +02:00
devices * Raw NAND changes 2026-08-23 09:11:21 -07:00
hyperbus mtd: hyperbus: hbmc-am654: drop unused module alias 2025-09-29 18:02:30 +02:00
lpddr Convert 'alloc_flex' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
maps * Raw NAND changes 2026-08-23 09:11:21 -07:00
nand * Raw NAND changes 2026-08-23 09:11:21 -07:00
parsers * Raw NAND changes 2026-08-23 14:30:31 +02:00
spi-nor * Extend SPI NAND continuous read to Winbond devices, which requires 2026-06-21 17:05:45 +02:00
tests Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
ubi UBI: support per-device wear-leveling threshold 2026-08-12 00:08:54 +02:00
ftl.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
inftlcore.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
inftlmount.c mtd: inftlmount: convert printk(KERN_WARNING) to pr_warn 2026-05-27 11:11:10 +02:00
Kconfig mtd: Add driver for concatenating devices 2026-02-25 17:34:20 +01:00
Makefile mtd: Add driver for concatenating devices 2026-02-25 17:34:20 +01:00
mtd_blkdevs.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
mtd_virt_concat.c treewide: refresh kmalloc_obj() conversions 2026-09-04 21:37:00 -07:00
mtdblock_ro.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
mtdblock.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
mtdchar.c mtdchar: replace deprecated mmap hook with mmap_prepare, clean up 2026-04-05 13:53:44 -07:00
mtdconcat.c treewide: refresh kmalloc_obj() conversions 2026-09-04 21:37:00 -07:00
mtdcore.c mtd: fix double free and WARN_ON in add_mtd_device() error paths 2026-07-03 15:45:43 +02:00
mtdcore.h Revert "mtd: core: always create master device" 2025-06-18 11:18:23 +02:00
mtdoops.c mtd: mtdoops: free page bitmap when the backing MTD is removed 2026-07-17 17:49:27 +02:00
mtdpart.c * Raw NAND changes 2026-08-23 09:11:21 -07:00
mtdpstore.c mtd: Add check for devm_kcalloc() 2025-03-04 12:07:08 +01:00
mtdsuper.c mtd: mtdsuper: replace simple_strtoul with kstrtouint 2026-04-27 15:12:59 +02:00
mtdswap.c * Raw NAND changes 2026-08-23 09:11:21 -07:00
nftlcore.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
nftlmount.c mtd: nftl: remove unnecessary oom message 2021-06-11 20:43:26 +02:00
rfd_ftl.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
sm_ftl.c mtd: sm_ftl: allocate cis_buffer with main struct 2026-05-04 15:50:47 +02:00
sm_ftl.h mtd: sm_ftl: allocate cis_buffer with main struct 2026-05-04 15:50:47 +02:00
ssfdc.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00