linux/drivers/comedi/drivers
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
..
ni_routing
tests
8255.c comedi: 8255: Fail to attach if fail to request I/O port region 2025-11-26 14:20:20 +01:00
8255_pci.c
Makefile comedi: Add new driver for ADLink PCI-7250 series 2025-09-06 16:03:25 +02:00
addi_apci_3xxx.c
addi_apci_16xx.c
addi_apci_1032.c
addi_apci_1500.c
addi_apci_1516.c
addi_apci_1564.c
addi_apci_2032.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
addi_apci_2200.c
addi_apci_3120.c
addi_apci_3501.c
addi_tcw.h
addi_watchdog.c
addi_watchdog.h
adl_pci7x3x.c
adl_pci6208.c
adl_pci7250.c comedi: Add new driver for ADLink PCI-7250 series 2025-09-06 16:03:25 +02:00
adl_pci8164.c
adl_pci9111.c
adl_pci9118.c
adq12b.c
adv_pci1710.c
adv_pci1720.c
adv_pci1723.c
adv_pci1724.c
adv_pci1760.c
adv_pci_dio.c
aio_aio12_8.c
aio_iiro_16.c comedi: aio_iiro_16: Fix bit shift out of bounds 2025-07-16 15:02:44 +02:00
amcc_s5933.h
amplc_dio200.c
amplc_dio200.h
amplc_dio200_common.c
amplc_dio200_pci.c
amplc_pc236.c
amplc_pc236.h
amplc_pc236_common.c
amplc_pc263.c
amplc_pci224.c
amplc_pci230.c
amplc_pci236.c
amplc_pci263.c
c6xdigio.c comedi: c6xdigio: Fix invalid PNP driver unregistration 2025-11-26 13:57:16 +01:00
cb_das16_cs.c
cb_pcidas.c
cb_pcidas64.c
cb_pcidda.c
cb_pcimdas.c
cb_pcimdda.c
comedi_8254.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
comedi_8255.c
comedi_bond.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
comedi_isadma.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
comedi_parport.c
comedi_test.c comedi: comedi_test: add a DIO subdevice 2026-01-16 16:33:13 +01:00
contec_pci_dio.c
dac02.c
daqboard2000.c
das08.c
das08.h
das08_cs.c
das08_isa.c
das08_pci.c
das16.c treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
das16m1.c comedi: das16m1: Fix bit shift out of bounds 2025-07-16 15:02:26 +02:00
das800.c
das1800.c
das6402.c comedi: das6402: Fix bit shift out of bounds 2025-07-16 15:02:44 +02:00
dmm32at.c comedi: dmm32at: serialize use of paged registers 2026-01-16 16:43:51 +01:00
dt282x.c
dt2801.c
dt2811.c
dt2814.c
dt2815.c
dt2817.c
dt3000.c
dt9812.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
dyna_pci10xx.c
fl512.c
gsc_hpdi.c
icp_multi.c
ii_pci20kc.c
jr3_pci.c kernel.h: drop hex.h and update all hex.h users 2026-01-20 19:44:19 -08:00
jr3_pci.h
ke_counter.c
me4000.c
me_daq.c
mf6x4.c
mite.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
mite.h
mpc624.c
multiq3.c comedi: multiq3: sanitize config options in multiq3_attach() 2025-11-26 14:19:00 +01:00
ni_65xx.c
ni_660x.c
ni_670x.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
ni_6527.c
ni_at_a2150.c
ni_at_ao.c
ni_atmio.c
ni_atmio16d.c
ni_daq_700.c
ni_daq_dio24.c
ni_labpc.c
ni_labpc.h
ni_labpc_common.c
ni_labpc_cs.c
ni_labpc_isadma.c
ni_labpc_isadma.h
ni_labpc_pci.c
ni_labpc_regs.h
ni_mio_common.c
ni_mio_cs.c
ni_pcidio.c
ni_pcimio.c
ni_routes.c
ni_routes.h
ni_stc.h
ni_tio.c Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
ni_tio.h
ni_tio_internal.h
ni_tiocmd.c
ni_usb6501.c
pcl711.c
pcl724.c
pcl726.c comedi: pcl726: Prevent invalid irq number 2025-08-19 12:56:16 +02:00
pcl730.c
pcl812.c comedi: pcl812: Fix bit shift out of bounds 2025-07-16 15:02:44 +02:00
pcl816.c
pcl818.c comedi: pcl818: fix null-ptr-deref in pcl818_ai_cancel() 2025-11-26 14:19:15 +01:00
pcm3724.c
pcmad.c
pcmda12.c
pcmmio.c
pcmuio.c
plx9052.h
plx9080.h
quatech_daqp_cs.c
rtd520.c
rti800.c
rti802.c
s526.c
s626.c
s626.h
ssv_dnp.c
usbdux.c
usbduxfast.c
usbduxsigma.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
vmk80xx.c
z8536.h