linux/arch/powerpc/platforms/powernv
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
..
copy-paste.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
eeh-powernv.c powerpc: Stop using no_llseek 2024-09-05 22:30:14 +10:00
idle.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
Kconfig powerpc/powernv/pci: Switch to use msi_create_parent_irq_domain() 2025-09-06 17:33:19 +05:30
Makefile cxl: Remove driver 2025-03-16 22:04:27 +11:00
memtrace.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
ocxl.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
opal-async.c Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
opal-call.c powerpc/powernv/pci: Remove MVE code 2023-06-21 15:13:57 +10:00
opal-core.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
opal-dump.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
opal-elog.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
opal-fadump.c powerpc/fadump: setup additional parameters for dump capture kernel 2024-05-10 16:36:10 +10:00
opal-fadump.h powerpc/fadump: Annotate endianness cast with __force 2023-10-19 17:16:20 +11:00
opal-flash.c sysfs: treewide: switch back to bin_attribute::read()/write() 2025-06-17 10:44:13 +02:00
opal-hmi.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
opal-imc.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
opal-irqchip.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
opal-kmsg.c printk: Add a short description string to kmsg_dump() 2024-07-17 12:35:24 +02:00
opal-lpc.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
opal-memory-errors.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
opal-msglog.c sysfs: treewide: switch back to bin_attribute::read()/write() 2025-06-17 10:44:13 +02:00
opal-nvram.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
opal-power.c powerpc/powernv: Add __init attribute to eligible functions 2021-12-23 22:33:15 +11:00
opal-powercap.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
opal-prd.c powerpc: Switch back to struct platform_driver::remove() 2024-09-10 11:27:40 +10:00
opal-psr.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
opal-rtc.c powerpc: Explicitly include correct DT includes 2023-08-02 22:22:19 +10:00
opal-secvar.c powerpc: Explicitly include correct DT includes 2023-08-02 22:22:19 +10:00
opal-sensor-groups.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
opal-sensor.c powerpc: Explicitly include correct DT includes 2023-08-02 22:22:19 +10:00
opal-sysparam.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
opal-tracepoints.c powerpc: Move C prototypes out of asm-prototypes.h 2022-03-08 22:06:25 +11:00
opal-wrappers.S powerpc/64: provide a helper macro to load r2 with the kernel TOC 2022-09-28 19:22:12 +10:00
opal-xscom.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
opal.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
pci-ioda-tce.c KVM: PPC: Book3s: Retire H_PUT_TCE/etc real mode handlers 2022-05-19 00:44:01 +10:00
pci-ioda.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
pci-sriov.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
pci.c cxl: Remove driver 2025-03-16 22:04:27 +11:00
pci.h cxl: Remove driver 2025-03-16 22:04:27 +11:00
powernv.h powerpc/powernv: wire up rng during setup_arch 2022-06-22 19:47:22 +10:00
rng.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
setup.c powerpc/mm: Cleanup memory block size probing 2023-08-18 17:03:15 +10:00
smp.c - The series "zram: optimal post-processing target selection" from 2024-11-23 09:58:07 -08:00
subcore-asm.S treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
subcore.c powerpc: Add PVN support for HeXin C2000 processor 2023-12-01 21:15:33 +11:00
subcore.h powerpc: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers 2025-09-01 13:23:29 +05:30
ultravisor.c sysfs: treewide: switch back to bin_attribute::read()/write() 2025-06-17 10:44:13 +02:00
vas-debug.c powerpc/vas: Define and use common vas_window struct 2021-06-20 21:58:56 +10:00
vas-fault.c powerpc: Fix all occurences of duplicate words 2022-07-25 12:05:15 +10:00
vas-trace.h powerpc/vas: Define and use common vas_window struct 2021-06-20 21:58:56 +10:00
vas-window.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
vas.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
vas.h powerpc/powernv/vas: Assign real address to rx_fifo in vas_rx_win_attr 2022-05-22 15:58:27 +10:00