linux/sound/pci
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
..
ac97 Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
ali5451 ALSA: ali5451: Use guard() for spin locks 2025-09-01 13:52:38 +02:00
asihpi Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
au88x0 Merge branch 'for-linus' into for-next 2025-11-20 09:49:30 +01:00
aw2 ALSA: aw2: Use guard() for spin locks 2025-09-01 13:52:39 +02:00
ca0106 Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
cs46xx Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
cs5535audio ALSA: cs5535audio: Use guard() for spin locks 2025-09-01 13:52:40 +02:00
ctxfi Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
echoaudio Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
emu10k1 Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
ice1712 Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
korg1212 ALSA: korg1212: Use guard() for spin locks 2025-09-01 13:52:41 +02:00
lola ALSA: lola: Use guard() for spin locks 2025-09-01 13:52:41 +02:00
lx6464es ALSA: lx6464es: Use guard() for mutex locks 2025-09-01 13:52:41 +02:00
mixart Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
nm256 ALSA: nm256: Use guard() for spin locks 2025-09-01 13:52:42 +02:00
oxygen ALSA: oxygen: Use guard() for spin locks 2025-09-01 13:52:42 +02:00
pcxhr Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
riptide Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
rme9652 Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
trident Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
vx222 ALSA: vx222: Use guard() for mutex locks 2025-09-01 13:52:43 +02:00
ymfpci Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
ad1889.c ALSA: ad1889: Use guard() for spin locks 2025-09-01 13:52:39 +02:00
ad1889.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ak4531_codec.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
als300.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
als4000.c ALSA: als4000: Use guard() for spin locks 2025-09-01 13:52:38 +02:00
atiixp.c ALSA: atiixp: Use guard() for spin locks 2025-09-01 13:52:39 +02:00
atiixp_modem.c ALSA: atiixp: Use guard() for spin locks 2025-09-01 13:52:39 +02:00
azt3328.c ALSA: azt3328: Use guard() for spin locks 2025-09-01 13:52:38 +02:00
azt3328.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
bt87x.c ALSA: bt87x: Use guard() for spin locks 2025-09-01 13:52:39 +02:00
cmipci.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
cs4281.c ALSA: cs4281: Send the PCM period elapsed notification properly 2025-09-06 19:55:10 +02:00
cs5530.c ALSA: cs5530: Use safer strscpy() instead of strcpy() 2025-07-11 09:53:19 +02:00
ens1370.c ALSA: ens137x: Use guard() for spin locks 2025-09-01 13:52:38 +02:00
ens1371.c ALSA: echoaudio: Add SPDX ids to some files 2026-02-18 08:57:38 +01:00
es1938.c ALSA: es1938: Use guard() for spin locks 2025-09-01 13:52:40 +02:00
es1968.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
fm801.c ALSA: fm801: Use guard() for spin locks 2025-09-01 13:52:41 +02:00
intel8x0.c ALSA: intel8x0: Use guard() for spin locks 2025-09-01 13:52:41 +02:00
intel8x0m.c ALSA: intel8x0: Use guard() for spin locks 2025-09-01 13:52:41 +02:00
Kconfig ALSA: hda: Move codec drivers into sound/hda/codecs directory 2025-07-11 09:55:37 +02:00
maestro3.c ALSA: maestro3: using vmalloc_array() to handle the code 2025-10-27 10:04:51 +01:00
Makefile ALSA: hda: Move codec drivers into sound/hda/codecs directory 2025-07-11 09:55:37 +02:00
rme32.c ALSA: rme32: Fix serialization in snd_rme32_capture_adat_open() 2025-09-03 09:21:58 +02:00
rme96.c ALSA: rme96: Use guard() for spin locks 2025-09-01 13:52:42 +02:00
sis7019.c ALSA: sis7019: Use guard() for spin locks 2025-09-01 13:52:42 +02:00
sis7019.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 274 2019-06-05 17:30:30 +02:00
sonicvibes.c ALSA: sonicvibes: Use guard() for spin locks 2025-09-01 13:52:42 +02:00
via82xx.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
via82xx_modem.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00