linux/drivers/iio
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
..
accel IIO: New device support, features and cleanup for the 6.20/7.0 cycle. 2026-02-02 17:08:30 +01:00
adc Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
addac treewide: rename GPIO set callbacks back to their original names 2025-08-07 10:07:06 +02:00
afe iio: normalize array sentinel style 2025-04-22 19:10:04 +01:00
amplifiers iio: amplifiers: adl8113: add driver support 2025-12-21 11:41:13 +00:00
buffer Convert 'alloc_flex' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
cdc iio: normalize array sentinel style 2025-04-22 19:10:04 +01:00
chemical IIO: New device support, features and cleanup for the 6.20/7.0 cycle. 2026-02-02 17:08:30 +01:00
common Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
dac Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
dummy Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
filter iio: normalize array sentinel style 2025-04-22 19:10:04 +01:00
frequency iio: frequency: adf4377: add clk provider support 2025-12-21 11:41:12 +00:00
gyro iio: gyro: itg3200: Fix unchecked return value in read_raw 2026-01-29 17:07:07 +00:00
health iio: Replace IRQF_ONESHOT with IRQF_NO_THREAD 2026-01-29 16:11:50 +00:00
humidity iio: humditiy: hdc3020: fix units for thresholds and hysteresis 2025-10-19 11:46:24 +01:00
imu Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
light iio: Use IRQF_NO_THREAD 2026-01-29 16:10:44 +00:00
magnetometer iio: magn: mmc5633: Fix Kconfig for combination of I3C as module and driver builtin 2026-02-01 16:53:35 +00:00
multiplexer iio: normalize array sentinel style 2025-04-22 19:10:04 +01:00
orientation iio: orientation: hid-sensor-rotation: remove unnecessary alignment 2025-05-21 14:20:28 +01:00
position iio: position: hid-sensor-custom-intel-hinge: replace sprintf() with sysfs_emit() 2025-10-19 11:59:18 +01:00
potentiometer iio: potentiometer: Drop unused export.h includes 2025-06-26 19:32:52 +01:00
potentiostat iio: potentiostat: Drop unnecessary -ENOMEM messages 2025-08-25 12:36:29 +01:00
pressure iio: Replace IRQF_ONESHOT with IRQF_NO_THREAD 2026-01-29 16:11:50 +00:00
proximity iio: proximity: rfd77402: Add interrupt handling support 2026-01-29 17:50:08 +00:00
resolver iio: resolver: ad2s1210: replace sprintf() with sysfs_emit() 2025-10-19 11:59:18 +01:00
temperature iio: Replace IRQF_ONESHOT with IRQF_NO_THREAD 2026-01-29 16:11:50 +00:00
test iio: test: drop dangling symbol in gain-time-scale helpers 2025-12-31 17:59:26 +00:00
trigger Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
iio_core.h iio: Add iio_read_channel_label to inkern API 2024-06-28 20:06:56 +01:00
iio_core_trigger.h
industrialio-acpi.c iio: acpi: Add iio_get_acpi_device_name_and_data() helper function 2024-10-28 20:04:11 +00:00
industrialio-backend.c iio: backend: fix kernel-doc to avoid warnings and ensure consistency 2025-11-09 12:57:05 +00:00
industrialio-buffer.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
industrialio-configfs.c
industrialio-core.c Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
industrialio-event.c Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
industrialio-gts-helper.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
industrialio-sw-device.c iio: core: Constify struct configfs_item_operations and configfs_group_operations 2025-12-31 17:59:26 +00:00
industrialio-sw-trigger.c iio: core: Constify struct configfs_item_operations and configfs_group_operations 2025-12-31 17:59:26 +00:00
industrialio-trigger.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
industrialio-triggered-event.c
inkern.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
Kconfig iio: core: Add new DMABUF interface infrastructure 2024-06-30 11:29:17 +01:00
Makefile iio: core: Add iio_read_acpi_mount_matrix() helper function 2024-04-29 20:53:25 +01:00
TODO iio: core: move 'mlock' to 'struct iio_dev_opaque' 2022-11-23 19:44:00 +00:00