linux/drivers/edac
Kees Cook 189f164e57 Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses
Conversion performed via this Coccinelle script:

  // SPDX-License-Identifier: GPL-2.0-only
  // Options: --include-headers-for-types --all-includes --include-headers --keep-comments
  virtual patch

  @gfp depends on patch && !(file in "tools") && !(file in "samples")@
  identifier ALLOC = {kmalloc_obj,kmalloc_objs,kmalloc_flex,
 		    kzalloc_obj,kzalloc_objs,kzalloc_flex,
		    kvmalloc_obj,kvmalloc_objs,kvmalloc_flex,
		    kvzalloc_obj,kvzalloc_objs,kvzalloc_flex};
  @@

  	ALLOC(...
  -		, GFP_KERNEL
  	)

  $ make coccicheck MODE=patch COCCI=gfp.cocci

Build and boot tested x86_64 with Fedora 42's GCC and Clang:

Linux version 6.19.0+ (user@host) (gcc (GCC) 15.2.1 20260123 (Red Hat 15.2.1-7), GNU ld version 2.44-12.fc42) #1 SMP PREEMPT_DYNAMIC 1970-01-01
Linux version 6.19.0+ (user@host) (clang version 20.1.8 (Fedora 20.1.8-4.fc42), LLD 20.1.8) #1 SMP PREEMPT_DYNAMIC 1970-01-01

Signed-off-by: Kees Cook <kees@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2026-02-22 08:26:33 -08:00
..
Kconfig EDAC/r82600: Remove this obsolete driver 2026-01-30 13:41:32 +01:00
Makefile EDAC/r82600: Remove this obsolete driver 2026-01-30 13:41:32 +01:00
a72_edac.c EDAC: Add EDAC driver for ARM Cortex A72 cores 2025-08-15 23:37:00 +02:00
al_mc_edac.c
altera_edac.c EDAC/altera: Remove IRQF_ONESHOT 2026-02-01 17:37:15 +01:00
altera_edac.h
amd64_edac.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
amd64_edac.h EDAC/amd64: Remove NUM_CONTROLLERS macro 2025-11-06 12:51:33 +01:00
amd76x_edac.c
armada_xp_edac.c
aspeed_edac.c
bluefield_edac.c
cpc925_edac.c
debugfs.c
dmc520_edac.c
e7xxx_edac.c
e752x_edac.c
ecs.c EDAC: Fix wrong executable file modes for C source files 2025-08-30 17:23:06 +02:00
edac_device.c Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
edac_device.h
edac_device_sysfs.c
edac_mc.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
edac_mc.h
edac_mc_sysfs.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
edac_module.c
edac_module.h
edac_pci.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
edac_pci.h
edac_pci_sysfs.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
fsl_ddr_edac.c
fsl_ddr_edac.h
ghes_edac.c EDAC/ghes: Replace deprecated strcpy() in ghes_edac_report_mem_error() 2025-11-18 16:50:32 +01:00
highbank_l2_edac.c
highbank_mc_edac.c
i7core_edac.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
i10nm_base.c EDAC/{skx_common,skx,i10nm}: Make skx_register_mci() independent of pci_dev 2025-11-19 12:11:40 -08:00
i3000_edac.c
i3200_edac.c EDAC/i3200: Fix a resource leak in i3200_probe1() 2026-01-04 08:31:44 +01:00
i5000_edac.c EDAC/i5000: Fix snprintf() size calculation in calculate_dimm_size() 2025-12-17 09:59:17 -08:00
i5100_edac.c
i5400_edac.c EDAC/i5400: Fix snprintf() limit calculation in calculate_dimm_size() 2025-12-17 10:00:20 -08:00
i7300_edac.c
i82860_edac.c
i82875p_edac.c
i82975x_edac.c
ie31200_edac.c bitmap updates for v6.19 2025-12-06 09:01:27 -08:00
igen6_edac.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
imh_base.c Convert 'alloc_flex' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
layerscape_edac.c
loongson_edac.c
mce_amd.c
mce_amd.h
mem_repair.c EDAC: Fix wrong executable file modes for C source files 2025-08-30 17:23:06 +02:00
mpc85xx_edac.c
mpc85xx_edac.h
npcm_edac.c
octeon_edac-l2c.c
octeon_edac-lmc.c
octeon_edac-pc.c
octeon_edac-pci.c
pasemi_edac.c
pnd2_edac.c
pnd2_edac.h
qcom_edac.c
sb_edac.c Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
scrub.c EDAC: Fix wrong executable file modes for C source files 2025-08-30 17:23:06 +02:00
sifive_edac.c
skx_base.c EDAC/{skx_common,skx,i10nm}: Make skx_register_mci() independent of pci_dev 2025-11-19 12:11:40 -08:00
skx_common.c Convert 'alloc_flex' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
skx_common.h EDAC/{skx_comm,imh}: Detect 2-level memory configuration 2025-11-21 10:20:51 -08:00
synopsys_edac.c EDAC/synopsys: Clear the ECC counters on init 2025-07-14 12:15:37 +02:00
thunderx_edac.c
ti_edac.c
versal_edac.c
versalnet_edac.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
wq.c
x38_edac.c EDAC/x38: Fix a resource leak in x38_probe1() 2026-01-04 08:35:39 +01:00
xgene_edac.c
zynqmp_edac.c