linux/drivers/iio/adc
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
..
88pm886-gpadc.c iio: adc: Add driver for Marvell 88PM886 PMIC ADC 2025-09-13 14:47:14 +01:00
ab8500-gpadc.c iio: adc: Remove redundant pm_runtime_mark_last_busy() calls 2025-08-25 15:57:14 +01:00
ad799x.c iio: adc: ad799x: add reference voltage to ad7994 2025-08-16 11:57:08 +01:00
ad4000.c iio: adc: ad4000: don't use shift_right() 2025-07-13 15:36:25 +01:00
ad4030.c Char/Misc/IIO driver updates for 6.19-rc1 2025-12-06 18:34:24 -08:00
ad4062.c iio: adc: ad4062: Switch from struct i3c_priv_xfer to struct i3c_xfer 2026-01-22 20:52:12 +00:00
ad4080.c iio: adc: ad4080: add support for AD4087 2025-11-09 12:57:04 +00:00
ad4130.c iio: Remove error prints for devm_add_action_or_reset() 2025-08-16 11:57:08 +01:00
ad4134.c iio: adc: Initial support for AD4134 2026-01-11 13:30:29 +00:00
ad4170-4.c iio: Replace IRQF_ONESHOT with IRQF_NO_THREAD 2026-01-29 16:11:50 +00:00
ad4695.c iio: adc: ad4695: rename AD4695_MAX_VIN_CHANNELS 2025-05-21 14:20:31 +01:00
ad4851.c iio: adc: ad4851: add spi 3-wire support 2025-07-06 10:37:51 +01:00
ad7091r-base.c iio: adc: ad7091r-base: Remove duplicate code on volatile reg check 2025-05-21 14:20:29 +01:00
ad7091r-base.h iio: adc: Fix typos in comments across various files 2024-10-05 12:09:15 +01:00
ad7091r5.c iio: adc: ad7091r5: make ad7091r5_init_info const 2025-07-06 10:37:51 +01:00
ad7091r8.c iio: adc: ad7091r8: make ad7091r_init_info const 2025-07-06 10:37:52 +01:00
ad7124.c Char/Misc/IIO driver updates for 6.19-rc1 2025-12-06 18:34:24 -08:00
ad7173.c iio: adc: ad7173: support changing filter type 2025-09-13 15:16:07 +01:00
ad7191.c iio: adc: ad7191: add AD7191 2025-03-11 19:08:56 +00:00
ad7192.c IIO: New device support, features and cleanup for the 6.15 cycle. 2025-03-14 07:15:12 +01:00
ad7266.c IIO: New device support, features and cleanup for 6.16 - take 2 2025-05-22 15:54:52 +02:00
ad7280a.c iio: adc: ad7280a: handle spi_setup() errors in probe() 2025-12-21 11:14:09 +00:00
ad7291.c iio: fix write_event_config signature 2024-11-03 20:33:44 +00:00
ad7292.c iio: adc: standardize on formatting for id match tables 2024-09-05 19:27:13 +01:00
ad7298.c iio: adc: Use iio_push_to_buffers_with_ts() to provide length for runtime checks. 2025-05-21 14:20:26 +01:00
ad7380.c iio: adc: ad7380: fix SPI offload trigger rate 2025-10-13 08:38:08 +01:00
ad7405.c iio: adc: ad7405: add ad7405 driver 2025-06-26 19:32:52 +01:00
ad7476.c iio: adc: ad7476: Remove duplicate include 2026-01-11 13:16:27 +00:00
ad7606.c iio: adc: ad7606: add gain calibration support 2025-06-09 07:45:37 +01:00
ad7606.h iio: adc: ad7606: add gain calibration support 2025-06-09 07:45:37 +01:00
ad7606_bus_iface.h iio: adc: adi-axi-adc: add platform children support 2025-02-11 19:56:25 +00:00
ad7606_par.c iio: adc: ad7606: Fix incorrect type for error return variable 2025-12-21 11:14:09 +00:00
ad7606_spi.c iio: adc: ad7606_spi: use bitmap_full() in ad7606_spi_update_scan_mode() 2025-12-21 19:47:04 +00:00
ad7625.c iio: adc: ad7625: Stop using iio_device_claim_direct_scoped() 2025-02-17 13:01:43 +00:00
ad7766.c iio: adc: ad7766: Use iio_trigger_generic_data_rdy_poll() 2026-01-29 16:13:52 +00:00
ad7768-1.c iio: Replace IRQF_ONESHOT with IRQF_NO_THREAD 2026-01-29 16:11:50 +00:00
ad7779.c iio: Replace IRQF_ONESHOT with IRQF_NO_THREAD 2026-01-29 16:11:50 +00:00
ad7780.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
ad7791.c iio: normalize array sentinel style 2025-04-22 19:10:04 +01:00
ad7793.c iio: adc: ad7793: Switch to sparse friendly iio_device_claim/release_direct() 2025-03-04 13:17:49 +00:00
ad7887.c iio: adc: Switch to sparse friendly iio_device_claim/release_direct() 2025-03-04 13:17:50 +00:00
ad7923.c iio: adc: Use iio_push_to_buffers_with_ts() to provide length for runtime checks. 2025-05-21 14:20:26 +01:00
ad7944.c IIO: New device support, features and cleanup for 6.16 - take 2 2025-05-22 15:54:52 +02:00
ad7949.c iio: adc: Drop unnecessary -ENOMEM messages 2025-08-25 12:32:13 +01:00
ad9467.c IIO: New device support, features and cleanup for the 6.20/7.0 cycle. 2026-02-02 17:08:30 +01:00
ad_sigma_delta.c iio: adc: ad_sigma_delta: change to buffer predisable 2025-07-16 08:47:12 +01:00
ade9000.c iio: core: Match iio_device_claim_*() semantics and implementation 2026-01-22 20:53:17 +00:00
adi-axi-adc.c iio: adc: adi-axi-adc: Slightly simplify axi_adc_create_platform_device() 2025-12-21 11:42:52 +00:00
aspeed_adc.c iio: adc: aspeed: Simplify probe() with local 'dev' and 'np' 2025-12-31 17:59:26 +00:00
at91-sama5d2_adc.c iio: adc: at91-sama5d2_adc: Fix potential use-after-free in sama5d2_adc driver 2025-12-21 11:14:09 +00:00
at91_adc.c iio: adc: at91_adc: make at91_adc_caps const 2025-07-06 10:37:52 +01:00
axp20x_adc.c Char / Misc / IIO / other driver updates for 6.17-rc1 2025-07-29 09:52:01 -07:00
axp288_adc.c iio: normalize array sentinel style 2025-04-22 19:10:04 +01:00
bcm_iproc_adc.c iio: adc: Drop unnecessary -ENOMEM messages 2025-08-25 12:32:13 +01:00
berlin2-adc.c iio: adc: standardize on formatting for id match tables 2024-09-05 19:27:13 +01:00
cc10001_adc.c iio: adc: cc10001_adc: make use of iio_for_each_active_channel() 2024-08-03 10:13:39 +01:00
cpcap-adc.c iio: adc: Drop unnecessary -ENOMEM messages 2025-08-25 12:32:13 +01:00
da9150-gpadc.c iio: adc: Drop unnecessary -ENOMEM messages 2025-08-25 12:32:13 +01:00
dln2-adc.c iio: adc: Drop unnecessary -ENOMEM messages 2025-08-25 12:32:13 +01:00
envelope-detector.c iio: normalize array sentinel style 2025-04-22 19:10:04 +01:00
ep93xx_adc.c iio: Switch back to struct platform_driver::remove() 2024-10-10 19:31:50 +01:00
exynos_adc.c IIO: New device support, features and cleanup for the 6.20/7.0 cycle. 2026-02-02 17:08:30 +01:00
fsl-imx25-gcq.c iio: normalize array sentinel style 2025-04-22 19:10:04 +01:00
gehc-pmc-adc.c iio: adc: Add support for the GE HealthCare PMC ADC 2024-10-06 14:00:15 +01:00
hi8435.c iio: Remove single use of macro definition for driver name 2025-06-09 07:45:36 +01:00
hx711.c iio: adc: Remove dev_err_probe() if error is -ENOMEM 2025-08-25 09:40:13 +01:00
imx7d_adc.c iio: adc: Drop unnecessary -ENOMEM messages 2025-08-25 12:32:13 +01:00
imx8qxp-adc.c iio: adc: Remove redundant pm_runtime_mark_last_busy() calls 2025-08-25 15:57:14 +01:00
imx93_adc.c iio: adc: Remove redundant pm_runtime_mark_last_busy() calls 2025-08-25 15:57:14 +01:00
ina2xx-adc.c iio: adc: Use iio_push_to_buffers_with_ts() to provide length for runtime checks. 2025-05-21 14:20:26 +01:00
industrialio-adc.c iio: adc: add helpers for parsing ADC nodes 2025-04-22 19:09:52 +01:00
ingenic-adc.c iio: adc: standardize on formatting for id match tables 2024-09-05 19:27:13 +01:00
intel_dc_ti_adc.c iio: adc: Add Intel Dollar Cove TI PMIC ADC driver 2025-09-10 19:47:05 +01:00
intel_mrfld_adc.c iio: normalize array sentinel style 2025-04-22 19:10:04 +01:00
Kconfig iio: adc: ad7768-1: add support for ADAQ776x-1 ADC Family 2026-01-22 20:53:18 +00:00
lp8788_adc.c iio: adc: Convert to IIO_MAP() 2024-09-30 09:21:02 +01:00
lpc18xx_adc.c iio: normalize array sentinel style 2025-04-22 19:10:04 +01:00
lpc32xx_adc.c iio: adc: standardize on formatting for id match tables 2024-09-05 19:27:13 +01:00
ltc2309.c iio: adc: ltc2309: Fix endian type passed to be16_to_cpu() 2024-06-28 20:04:18 +01:00
ltc2471.c iio: normalize array sentinel style 2025-04-22 19:10:04 +01:00
ltc2485.c iio: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-05-27 09:48:57 +01:00
ltc2496.c iio: adc: standardize on formatting for id match tables 2024-09-05 19:27:13 +01:00
ltc2497-core.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
ltc2497.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
ltc2497.h module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
Makefile iio: adc: Initial support for AD4134 2026-01-11 13:30:29 +00:00
max1027.c iio: adc: max1027: Switch to sparse friendly iio_device_claim/release_direct() 2025-03-04 13:17:50 +00:00
max1118.c iio: adc: Use iio_push_to_buffers_with_ts() to provide length for runtime checks. 2025-05-21 14:20:26 +01:00
max1241.c iio: adc: standardize on formatting for id match tables 2024-09-05 19:27:13 +01:00
max1363.c iio: adc: max1363: Reorder mode_list[] entries 2025-06-09 07:45:19 +01:00
max9611.c iio: Remove single use of macro definition for driver name 2025-06-09 07:45:36 +01:00
max11100.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
max11205.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
max11410.c iio: adc: Use iio_push_to_buffers_with_ts() to provide length for runtime checks. 2025-05-21 14:20:26 +01:00
max14001.c iio: adc: max14001: New driver 2025-10-20 18:51:04 +01:00
max34408.c iio: adc: Include cleanup.h when using guard() 2025-03-04 13:17:51 +00:00
max77541-adc.c iio: normalize array sentinel style 2025-04-22 19:10:04 +01:00
mcp320x.c iio: adc: mcp320x: Drop vendorless compatible strings 2024-09-03 18:49:44 +01:00
mcp3422.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
mcp3564.c iio: adc: mcp3564: replace sprintf() with sysfs_emit() 2025-10-19 11:59:17 +01:00
mcp3911.c iio: Replace IRQF_ONESHOT with IRQF_NO_THREAD 2026-01-29 16:11:50 +00:00
men_z188_adc.c iio: adc: men_z188_adc: drop unneeded MODULE_ALIAS 2026-01-11 12:21:23 +00:00
meson_saradc.c iio: adc: meson_saradc: replace sprintf() with sysfs_emit() 2025-10-19 11:59:17 +01:00
mp2629_adc.c iio: adc: mp2629_adc: make mp2629_channels const 2025-07-06 10:37:52 +01:00
mt6359-auxadc.c iio: adc: mt6359: Add support for MediaTek MT6373 PMIC AUXADC 2025-07-13 15:36:26 +01:00
mt6360-adc.c iio: adc: mt6360-adc: replace snprintf() with sysfs_emit() 2025-10-19 11:59:17 +01:00
mt6370-adc.c iio: normalize array sentinel style 2025-04-22 19:10:04 +01:00
mt6577_auxadc.c iio: Remove error prints for devm_add_action_or_reset() 2025-08-16 11:57:08 +01:00
mxs-lradc-adc.c iio: adc: Drop unnecessary -ENOMEM messages 2025-08-25 12:32:13 +01:00
nau7802.c iio: adc: standardize on formatting for id match tables 2024-09-05 19:27:13 +01:00
nct7201.c iio: adc: add support for Nuvoton NCT7201 2025-05-21 14:22:32 +01:00
npcm_adc.c iio: normalize array sentinel style 2025-04-22 19:10:04 +01:00
nxp-sar-adc.c iio: adc: Add the NXP SAR ADC support for the s32g2/3 platforms 2025-12-21 11:41:12 +00:00
pac1921.c iio: adc: pac1921: replace sprintf() with sysfs_emit() 2025-10-19 11:59:17 +01:00
pac1934.c iio: adc: pac1934: Fix clamped value in pac1934_reg_snapshot 2025-12-21 11:14:10 +00:00
palmas_gpadc.c iio: adc: Drop unnecessary -ENOMEM messages 2025-08-25 12:32:13 +01:00
qcom-pm8xxx-xoadc.c iio: Switch back to struct platform_driver::remove() 2024-10-10 19:31:50 +01:00
qcom-spmi-adc5.c iio: adc: qcom-spmi-adc5: Tidy up adc5_get_fw_data() error messages 2024-10-05 12:19:01 +01:00
qcom-spmi-iadc.c iio: adc: qcom-spmi-iadc: Fix wakeup source leaks on device unbind 2025-04-12 12:24:00 +01:00
qcom-spmi-rradc.c iio: adc: qcom-spmi-rradc: Simplify with dev_err_probe 2025-12-21 12:03:10 +00:00
qcom-spmi-vadc.c iio: adc: qcom-spmi-vadc: use scoped device_for_each_child_node() 2024-10-05 12:09:14 +01:00
qcom-vadc-common.c iio: adc: qcom-vadc: make scale_adc5_fn const 2025-07-06 10:37:52 +01:00
rcar-gyroadc.c iio: adc: Remove redundant pm_runtime_mark_last_busy() calls 2025-08-25 15:57:14 +01:00
rn5t618-adc.c iio: adc: Drop unnecessary -ENOMEM messages 2025-08-25 12:32:13 +01:00
rockchip_saradc.c iio: adc: rockchip: Simplify probe() with local 'dev' 2025-12-31 17:59:26 +00:00
rohm-bd79112.c iio: adc: rohm-bd79112: Use regmap_reg_range() 2025-11-09 12:57:04 +00:00
rohm-bd79124.c iio: adc: rohm-bd79124: Use regmap_reg_range() 2025-11-09 12:57:05 +00:00
rtq6056.c iio: adc: rtq6056: Correct the sign bit index 2025-10-13 08:38:08 +01:00
rzg2l_adc.c Linux 6.17-rc3 2025-09-13 15:00:48 +01:00
rzn1-adc.c iio: adc: Add support for the Renesas RZ/N1 ADC 2025-11-09 15:08:53 +00:00
rzt2h_adc.c iio: adc: add RZ/T2H / RZ/N2H ADC driver 2025-10-19 11:59:18 +01:00
sc27xx_adc.c iio: adc: sc27xx: Simplify with dev_err_probe 2025-12-21 12:03:10 +00:00
sd_adc_modulator.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
sophgo-cv1800b-adc.c iio: adc: sophgo-saradc: Add driver for Sophgo CV1800B SARADC 2024-09-03 20:05:03 +01:00
spear_adc.c iio: adc: Remove dev_err_probe() if error is -ENOMEM 2025-08-25 09:40:13 +01:00
stm32-adc-core.c iio: adc: Remove redundant pm_runtime_mark_last_busy() calls 2025-08-25 15:57:14 +01:00
stm32-adc-core.h iio: adc: stm32: add oversampling support 2025-05-21 14:20:28 +01:00
stm32-adc.c iio: adc: Remove redundant pm_runtime_mark_last_busy() calls 2025-08-25 15:57:14 +01:00
stm32-dfsdm-adc.c iio: adc: stm32-dfsdm: fix st,adc-alt-channel property handling 2025-10-13 08:38:08 +01:00
stm32-dfsdm-core.c iio: adc: stm32-dfsdm: Fix build warnings about export.h 2025-06-26 19:32:52 +01:00
stm32-dfsdm.h iio: adc: stm32-dfsdm: add id registers support 2023-01-08 13:11:03 +00:00
stmpe-adc.c iio: adc: Drop unnecessary -ENOMEM messages 2025-08-25 12:32:13 +01:00
sun4i-gpadc-iio.c iio: adc: Remove redundant pm_runtime_mark_last_busy() calls 2025-08-25 15:57:14 +01:00
sun20i-gpadc-iio.c iio: normalize array sentinel style 2025-04-22 19:10:04 +01:00
ti-adc081c.c iio: adc: ti-adc081c: use individual model structures instead of array 2025-08-16 11:57:05 +01:00
ti-adc084s021.c iio: adc: Drop unnecessary -ENOMEM messages 2025-08-25 12:32:13 +01:00
ti-adc108s102.c iio: adc: Switch to sparse friendly iio_device_claim/release_direct() 2025-03-04 13:17:50 +00:00
ti-adc128s052.c iio: adc: adc128s052: Support ROHM BD7910[0,1,2,3] 2025-08-18 20:12:25 +01:00
ti-adc161s626.c iio: adc: ti-adc161s626: Stop using iio_device_claim_direct_scoped() 2025-02-17 13:02:16 +00:00
ti-adc0832.c iio: adc: Use iio_push_to_buffers_with_ts() to provide length for runtime checks. 2025-05-21 14:20:26 +01:00
ti-adc12138.c iio: adc: ti-adc12138: Simplify with devm_clk_get_enabled() 2025-08-16 11:57:06 +01:00
ti-ads124s08.c iio: adc: Use iio_push_to_buffers_with_ts() to provide length for runtime checks. 2025-05-21 14:20:26 +01:00
ti-ads131e08.c iio: Replace IRQF_ONESHOT with IRQF_NO_THREAD 2026-01-29 16:11:50 +00:00
ti-ads131m02.c iio: adc: Add TI ADS131M0x ADC driver 2025-12-21 11:41:12 +00:00
ti-ads1015.c iio: adc: Remove redundant pm_runtime_mark_last_busy() calls 2025-08-25 15:57:14 +01:00
ti-ads1018.c iio: adc: ti-ads1018: Drop stale kernel-doc function context 2026-01-11 13:07:29 +00:00
ti-ads1100.c iio: adc: Remove redundant pm_runtime_mark_last_busy() calls 2025-08-25 15:57:14 +01:00
ti-ads1119.c iio: adc: Remove redundant pm_runtime_mark_last_busy() calls 2025-08-25 15:57:14 +01:00
ti-ads1298.c iio: adc: Switch to sparse friendly iio_device_claim/release_direct() 2025-03-04 13:17:50 +00:00
ti-ads7138.c iio: adc: Add driver for ADS7128 / ADS7138 2025-02-16 15:52:22 +00:00
ti-ads7924.c iio: adc: Remove dev_err_probe() if error is -ENOMEM 2025-08-25 09:40:13 +01:00
ti-ads7950.c treewide: rename GPIO set callbacks back to their original names 2025-08-07 10:07:06 +02:00
ti-ads8344.c iio: adc: standardize on formatting for id match tables 2024-09-05 19:27:13 +01:00
ti-ads8688.c iio: adc: Use iio_push_to_buffers_with_ts() to provide length for runtime checks. 2025-05-21 14:20:26 +01:00
ti-lmp92064.c iio: adc: ti-lmp92064: use = { } instead of memset() 2025-06-26 19:32:56 +01:00
ti-tlc4541.c iio: adc: Use iio_push_to_buffers_with_ts() to provide length for runtime checks. 2025-05-21 14:20:26 +01:00
ti-tsc2046.c Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
ti_am335x_adc.c iio: adc: ti_am335x_adc: Limit step_avg to valid range for gcc complains 2025-10-19 11:59:23 +01:00
twl4030-madc.c iio: adc: Drop unnecessary -ENOMEM messages 2025-08-25 12:32:13 +01:00
twl6030-gpadc.c iio: normalize array sentinel style 2025-04-22 19:10:04 +01:00
vf610_adc.c iio: adc: Remove dev_err_probe() if error is -ENOMEM 2025-08-25 09:40:13 +01:00
viperboard_adc.c iio: adc: Drop unnecessary -ENOMEM messages 2025-08-25 12:32:13 +01:00
xilinx-ams.c iio: xilinx-ams: Fix AMS_ALARM_THR_DIRECT_MASK 2025-08-25 12:22:52 +01:00
xilinx-xadc-core.c iio: normalize array sentinel style 2025-04-22 19:10:04 +01:00
xilinx-xadc-events.c iio: fix write_event_config signature 2024-11-03 20:33:44 +00:00
xilinx-xadc.h iio: fix write_event_config signature 2024-11-03 20:33:44 +00:00