linux/sound/soc/sof
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
..
amd ASoC: SOF: amd: acp-ipc: Use guard() for spinlock_irq() 2026-01-12 11:21:25 +00:00
imx ASoC: SOF: imx: imx-common: Use guard() for spinlock_irqsafe() 2026-01-12 11:21:26 +00:00
intel Convert 'alloc_flex' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
mediatek ASoC: SOF: mediatek: mtk-adsp-common: Use guard() for spinlock_irqsave 2026-01-12 11:21:27 +00:00
xtensa module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
compress.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
control.c ASoC: SOF: Add support for on-demand DSP boot 2025-12-15 23:07:41 +09:00
core.c ASoC: SOF: Add support for on-demand DSP boot 2025-12-15 23:07:41 +09:00
debug.c ASoC: SOF: Add support for on-demand DSP boot 2025-12-15 23:07:41 +09:00
fw-file-profile.c ASoC: SOF: Fix function topology name check in profile info output 2025-10-23 13:42:47 +01:00
iomem-utils.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
ipc.c ASoC: SOF: ipc/ops: Use guard() for spinlocks 2026-01-12 11:21:29 +00:00
ipc3-control.c ASoC: SOF: Intel: clarify Copyright information 2024-05-06 23:59:35 +09:00
ipc3-dtrace.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
ipc3-loader.c ASoC: SOF: ipc3-loader: 'Handle' PROBE_INFO ext_manifest type when parsing 2024-11-07 13:03:23 +00:00
ipc3-pcm.c ASoC: SOF: pcm: Add snd_sof_pcm specific wrappers for dev_dbg() and dev_err() 2025-02-06 11:25:43 +00:00
ipc3-priv.h ASoC: SOF: Intel: clarify Copyright information 2024-05-06 23:59:35 +09:00
ipc3-topology.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
ipc3.c ASoC: SOF: Use guard()/scoped_guard() for mutex locks where it makes sense 2026-01-12 11:21:24 +00:00
ipc4-control.c ASoC: SOF: ipc4-control: Set correct error code in refresh_bytes_control 2026-02-09 12:27:28 +00:00
ipc4-fw-reg.h ASoC: SOF: Intel: clarify Copyright information 2024-05-06 23:59:35 +09:00
ipc4-loader.c ASoC: SOF: ipc4-loader: Remove redundant rpm resume_and_get from load_library 2025-12-15 23:07:40 +09:00
ipc4-mtrace.c ASoC: SOF: Use guard()/scoped_guard() for mutex locks where it makes sense 2026-01-12 11:21:24 +00:00
ipc4-pcm.c Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
ipc4-priv.h ASoC: SOF: ipc4-pcm: Harmonize set pipeline state dbg 2025-06-20 11:33:05 +01:00
ipc4-telemetry.c ASoC: SOF: Intel: clarify Copyright information 2024-05-06 23:59:35 +09:00
ipc4-telemetry.h ASoC: SOF: Intel: clarify Copyright information 2024-05-06 23:59:35 +09:00
ipc4-topology.c Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
ipc4-topology.h ASoC: SOF: ipc4-topology: Add new tokens for pipeline direction 2026-02-04 13:26:05 +00:00
ipc4.c ASoC: SOF: Use guard()/scoped_guard() for mutex locks where it makes sense 2026-01-12 11:21:24 +00:00
Kconfig ASoC: sof: Standardize ASoC menu 2025-06-24 01:01:18 +01:00
loader.c ASoC: SOF: Intel: clarify Copyright information 2024-05-06 23:59:35 +09:00
Makefile ASoC: SOF: Use *-y instead of *-objs in Makefile 2024-05-08 11:39:30 +09:00
nocodec.c ASoC: sof: remove dpcm_xxx flags 2024-10-23 13:01:56 +01:00
ops.c ASoC: SOF: ipc/ops: Use guard() for spinlocks 2026-01-12 11:21:29 +00:00
ops.h ASoC: SOF: Use guard()/scoped_guard() for mutex locks where it makes sense 2026-01-12 11:21:24 +00:00
pcm.c ASoC: SOF: pcm: Split up widget prepare and setup 2026-02-04 13:26:02 +00:00
pm.c ASoC: SOF: Add support for on-demand DSP boot 2025-12-15 23:07:41 +09:00
sof-acpi-dev.c ASoC: SOF: acpi: Convert to EXPORT_NS_DEV_PM_OPS() 2025-03-17 10:14:55 +00:00
sof-acpi-dev.h ASoC: SOF: Intel: clarify Copyright information 2024-05-06 23:59:35 +09:00
sof-audio.c ASoC: SOF: sof-audio: Add support for loopback capture 2026-02-04 13:26:08 +00:00
sof-audio.h ASoC: SOF: ipc4-topology: Add new tokens for pipeline direction 2026-02-04 13:26:05 +00:00
sof-client-ipc-flood-test.c ASoC: SOF: sof-client: Add support for on-demand DSP boot 2025-12-15 23:07:42 +09:00
sof-client-ipc-kernel-injector.c ASoC: SOF: sof-client: Add support for on-demand DSP boot 2025-12-15 23:07:42 +09:00
sof-client-ipc-msg-injector.c ASoC: SOF: sof-client: Add support for on-demand DSP boot 2025-12-15 23:07:42 +09:00
sof-client-probes-ipc3.c ASoC: SOF: sof-client-probes: Add available points_info(), IPC4 only 2025-08-29 13:34:19 +02:00
sof-client-probes-ipc4.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
sof-client-probes.c ASoC: SOF: sof-client: Add support for on-demand DSP boot 2025-12-15 23:07:42 +09:00
sof-client-probes.h ASoC: Updates for v6.18 2025-09-20 08:38:17 +02:00
sof-client.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
sof-client.h ASoC: SOF: sof-client: Add support for on-demand DSP boot 2025-12-15 23:07:42 +09:00
sof-of-dev.c ASoC: SOF: of: Convert to EXPORT_DEV_PM_OPS() 2025-03-17 10:14:57 +00:00
sof-of-dev.h ASoC: SOF: Move sof_of_machine_select() to core.c from sof-of-dev.c 2023-12-04 17:02:15 +00:00
sof-pci-dev.c ASoC: sof: Use pure devres PCI 2025-05-05 19:32:11 +09:00
sof-pci-dev.h ASoC: SOF: Intel: clarify Copyright information 2024-05-06 23:59:35 +09:00
sof-priv.h ASoC: SOF: Add support for on-demand DSP boot 2025-12-15 23:07:41 +09:00
sof-utils.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
sof-utils.h ASoC: SOF: Intel: clarify Copyright information 2024-05-06 23:59:35 +09:00
stream-ipc.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
topology.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
trace.c ASoC: SOF: Intel: clarify Copyright information 2024-05-06 23:59:35 +09:00