linux/drivers/hwmon
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
..
occ hwmon: (occ) Mark occ_init_attribute() as __printf 2026-02-04 14:40:36 -08:00
peci hwmon: (peci) Rely on subsystem locking 2025-10-17 07:18:06 -07:00
pmbus mm.git review status for linus..mm-nonmm-stable 2026-02-12 12:13:01 -08:00
Kconfig hwmon: (tmp108) Add support for P3T1035 and P3T2030 2026-01-31 07:38:33 -08:00
Makefile hwmon: Add Apple Silicon SMC hwmon driver 2025-11-18 18:46:21 -08:00
abituguru.c
abituguru3.c
acpi_power_meter.c Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
ad7314.c
ad7414.c
ad7418.c
adc128d818.c
adcxx.c
adm1025.c
adm1026.c hwmon: (adm1026) Convert macros to functions to avoid TOCTOU 2025-11-26 07:50:13 -08:00
adm1029.c hwmon: (adm1029) Add locking to avoid TOCTOU 2025-11-26 07:48:31 -08:00
adm1031.c
adm1177.c
adm9240.c hwmon: (adm9240) Rely on subsystem locking 2025-10-15 11:02:43 -07:00
ads7828.c
ads7871.c
adt7x10.c hwmon: (adt7x10) Rely on subsystem locking 2025-10-17 07:18:06 -07:00
adt7x10.h
adt7310.c
adt7410.c hwmon: (adt7410): Support adt7422 chip 2025-10-16 13:46:06 -07:00
adt7411.c hwmon: (adt7411) Rely on subsystem locking 2025-10-17 07:17:48 -07:00
adt7462.c
adt7470.c
adt7475.c hwmon: (adt7475) Implement support for #pwm-cells = <3> 2025-07-20 16:38:34 -07:00
aht10.c hwmon: (aht10) Add support for dht20 2025-11-02 11:07:16 -08:00
amc6821.c hwmon: (amc6821) Add cooling device support 2025-07-20 16:38:34 -07:00
applesmc.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
aquacomputer_d5next.c hwmon: (aquacomputer_d5next) Rely on subsystem locking 2025-10-17 07:18:15 -07:00
as370-hwmon.c
asb100.c
asc7621.c
aspeed-g6-pwm-tach.c hwmon: (aspeed-g6-pwm-tach): Add AST2700 compatible string 2025-11-21 11:20:59 -08:00
aspeed-pwm-tacho.c
asus-ec-sensors.c hwmon: (asus-ec-sensors) Add VRM temperature for Pro WS WRX90E-SAGE SE 2026-01-31 07:38:31 -08:00
asus_atk0110.c
asus_rog_ryujin.c hwmon: (asus_rog_ryujin) Rely on subsystem locking 2025-10-17 07:18:15 -07:00
asus_wmi_sensors.c
atxp1.c
axi-fan-control.c include: linux: move adi-axi-common.h out of fpga 2025-06-30 17:57:15 -07:00
bt1-pvt.c
bt1-pvt.h
cgbc-hwmon.c hwmon: (cgbc-hwmon) Add missing NULL check after devm_kzalloc() 2025-10-19 18:56:14 -07:00
chipcap2.c hwmon: (chipcap2) Drop unnecessary include files 2025-10-17 07:18:15 -07:00
coretemp.c Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
corsair-cpro.c hwmon: (corsair-cpro) Replace magic values with constants 2025-11-13 12:23:26 -08:00
corsair-psu.c hwmon: (corsair-psu) Rely on subsystem locking 2025-10-17 07:18:15 -07:00
cros_ec_hwmon.c hwmon: (cros_ec) Add support for temperature thresholds 2026-02-07 09:32:20 -08:00
da9052-hwmon.c
da9055-hwmon.c
dell-smm-hwmon.c hwmon: (dell-smm) Add support for Dell OptiPlex 7080 2026-01-31 07:38:31 -08:00
dme1737.c
drivetemp.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
ds620.c
ds1621.c
emc6w201.c
emc1403.c hwmon: (emc1403) Rely on subsystem locking 2025-10-15 11:02:43 -07:00
emc2103.c hwmon: (emc2103) Add locking to avoid TOCTOU 2025-11-24 11:45:16 -08:00
emc2305.c hwmon: (emc2305) Fix a resource leak in emc2305_of_parse_pwm_child 2026-01-31 07:38:32 -08:00
f71805f.c
f71882fg.c hwmon: (f71882fg) Add F81968 support 2026-01-31 07:38:32 -08:00
f75375s.c
fam15h_power.c hwmon: (fam15h_power) Use generic power management 2026-01-31 07:38:31 -08:00
fschmd.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
ftsteutates.c hwmon: (ftsteutates) Rely on subsystem locking 2025-10-17 05:59:13 -07:00
g760a.c
g762.c
gigabyte_waterforce.c
gl518sm.c
gl520sm.c
gpd-fan.c hwmon: (gpd-fan) add support for Micro PC 2 2026-01-31 07:38:32 -08:00
gpio-fan.c hwmon: (gpio-fan) Allow to stop FANs when CONFIG_PM is disabled 2026-02-02 09:00:28 -08:00
gsc-hwmon.c hwmon: (gsc-hwmon) fix fan pwm setpoint show functions 2025-07-20 16:37:09 -07:00
gxp-fan-ctrl.c
hih6130.c
hp-wmi-sensors.c
hs3001.c hwmon: (hs3001) Rely on subsystem locking 2025-10-17 05:59:12 -07:00
htu31.c hwmon: add driver for HTU31 2025-03-18 08:03:40 -07:00
hwmon-vid.c x86/msr: Add explicit includes of <asm/msr.h> 2025-05-02 10:23:47 +02:00
hwmon.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
i5k_amb.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
i5500_temp.c hwmon: (i5500_temp) Drop unnecessary include files 2025-10-17 07:18:15 -07:00
ibmaem.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
ibmpex.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
ibmpowernv.c
iio_hwmon.c
ina2xx.c hwmon: (ina2xx) Rely on subsystem locking 2025-10-17 05:59:12 -07:00
ina209.c
ina238.c hwmon: (ina238) Rely on subsystem locking 2025-10-17 05:59:13 -07:00
ina3221.c hwmon: (ina3221) Rely on subsystem locking 2025-10-17 05:59:12 -07:00
intel-m10-bmc-hwmon.c
isl28022.c hwmon: (isl28022) Fix current reading calculation 2025-05-19 21:56:18 -07:00
it87.c
jc42.c hwmon: (jc42) Rely on subsystem locking 2025-10-15 11:02:43 -07:00
k8temp.c
k10temp.c hwmon: (k10temp) Add AMD Steam Deck APU ID 2025-11-18 18:46:21 -08:00
kbatt.c hwmon: Add KEBA battery monitoring controller support 2025-04-23 07:18:27 -07:00
kfan.c hwmon: Add KEBA fan controller support 2025-05-12 18:05:54 -07:00
lan966x-hwmon.c
lenovo-ec-sensors.c hwmon: (lenovo-ec-sensors) Update P8 supprt 2025-09-07 16:33:47 -07:00
lineage-pem.c
lm63.c
lm70.c
lm73.c
lm75.c hwmon: (lm75): switch to use i3c_xfer from i3c_priv_xfer 2025-12-02 17:33:02 +01:00
lm75.h
lm77.c
lm78.c hwmon/lm78: Drop REALLY_SLOW_IO setting 2025-11-26 09:03:56 -08:00
lm80.c
lm83.c
lm85.c
lm87.c hwmon: (lm87) Convert macros to functions to avoid TOCTOU 2025-11-26 07:47:25 -08:00
lm90.c hwmon: (lm90) Rely on subsystem locking 2025-10-15 11:02:43 -07:00
lm92.c hwmon: (lm92) Rely on subsystem locking 2025-10-17 05:59:12 -07:00
lm93.c
lm95234.c hwmon: (lm95234) Rely on subsystem locking 2025-10-17 05:59:12 -07:00
lm95241.c hwmon: (lm95241) Rely on subsystem locking 2025-10-17 05:59:13 -07:00
lm95245.c hwmon: (lm95245) Rely on subsystem locking 2025-10-15 11:02:43 -07:00
lochnagar-hwmon.c hwmon: (lochnagar-hwmon) Rely on subsystem locking 2025-10-17 07:18:10 -07:00
ltc2945.c
ltc2947-core.c hwmon: (ltc2947-core) Rely on subsystem locking 2025-10-17 07:18:02 -07:00
ltc2947-i2c.c
ltc2947-spi.c
ltc2947.h
ltc2990.c
ltc2991.c
ltc2992.c treewide: rename GPIO set callbacks back to their original names 2025-08-07 10:07:06 +02:00
ltc4151.c
ltc4215.c
ltc4222.c
ltc4245.c hwmon: (ltc4245) Rely on subsystem locking 2025-10-15 11:02:43 -07:00
ltc4260.c
ltc4261.c
ltc4282.c hwmon: (ltc4282): Fix reset_history file permissions 2025-12-19 08:44:22 -08:00
ltq-cputemp.c
macsmc-hwmon.c hwmon: Add Apple Silicon SMC hwmon driver 2025-11-18 18:46:21 -08:00
max127.c hwmon: (max127) Rely on subsystem locking 2025-10-17 05:59:12 -07:00
max197.c
max1111.c
max1619.c
max1668.c
max6620.c hwmon: (max6620) Rely on subsystem locking 2025-10-15 11:02:43 -07:00
max6621.c
max6639.c hwmon: (max6639) Simplify with scoped for each OF child loop 2026-01-31 07:38:32 -08:00
max6650.c
max6697.c hwmon: (max6697) fix regmap leak on probe failure 2025-11-27 08:08:25 -08:00
max16065.c hwmon: (max16065) Use READ/WRITE_ONCE to avoid compiler optimization induced race 2026-02-07 09:33:00 -08:00
max31722.c
max31730.c
max31760.c
max31790.c hwmon: (max31790) Rely on subsystem locking 2025-10-15 11:02:43 -07:00
max31827.c hwmon: (max31827) Rely on subsystem locking 2025-10-15 11:02:43 -07:00
max77705-hwmon.c hwmon: (max77705) Add initial support 2025-04-23 07:21:15 -07:00
mc33xs2410_hwmon.c hwmon: add support for MC33XS2410 hardware monitoring 2025-07-24 09:20:39 +02:00
mc34vr500.c
mc13783-adc.c
mcp3021.c
menf21bmc_hwmon.c
mlxreg-fan.c hwmon: (mlxreg-fan) Add support for new flavour of capability register 2025-09-25 08:08:14 -07:00
mr75203.c hwmon: (mr75203) Drop unnecessary include file 2025-10-17 05:59:12 -07:00
nct6683.c hwmon: (nct6683) Add customer ID for ASRock Z590 Taichi 2026-01-31 07:38:32 -08:00
nct6694-hwmon.c hwmon: Add Nuvoton NCT6694 HWMON support 2025-09-16 14:41:57 +01:00
nct6775-core.c hwmon: (nct6775) use sysfs_emit instead of sprintf 2026-02-07 09:33:00 -08:00
nct6775-i2c.c
nct6775-platform.c hwmon: (nct6775) Add ASUS Pro WS WRX90E-SAGE SE 2026-01-31 07:38:31 -08:00
nct6775.h
nct7363.c hwmon: (nct7363) Fix a resource leak in nct7363_present_pwm_fanin 2026-01-31 07:38:32 -08:00
nct7802.c
nct7904.c hwmon: (nct7904) Rely on subsystem locking 2025-10-15 11:02:43 -07:00
npcm750-pwm-fan.c hwmon: (corsair-psu) Rely on subsystem locking 2025-10-17 07:18:15 -07:00
nsa320-hwmon.c
ntc_thermistor.c hwmon: (ntc-thermistor) Add Murata ncp18wm474 2025-10-15 11:02:42 -07:00
nzxt-kraken2.c
nzxt-kraken3.c
nzxt-smart2.c hwmon: (nzxt-smart2) Use devm_mutex_init() 2025-09-07 16:35:18 -07:00
pc87360.c
pc87427.c
pcf8591.c
powerz.c
powr1220.c hwmon: (powr1220) Rely on subsystem locking 2025-10-17 05:59:12 -07:00
pt5161l.c hwmon: (pt5161l) Use per-client debugfs entry 2025-03-05 21:17:56 -08:00
pwm-fan.c hwmon: (pwm-fan) Implement after shutdown fan settings 2025-09-07 16:33:48 -07:00
qnap-mcu-hwmon.c hwmon: (qnap-mcu) Remove (explicitly) unused header 2025-04-23 07:18:26 -07:00
raspberrypi-hwmon.c
sa67mcu-hwmon.c hwmon: add SMARC-sAM67 support 2025-09-25 08:08:13 -07:00
sbtsi_temp.c hwmon: (sbtsi_temp) Rely on subsystem locking 2025-10-17 05:59:12 -07:00
sch56xx-common.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
sch56xx-common.h
sch5627.c
sch5636.c
scmi-hwmon.c hwmon: (scmi) Enable sensors to assure they can be read 2025-10-15 11:04:40 -07:00
scpi-hwmon.c
sfctemp.c hwmon: (sfctemp) Rely on subsystem locking 2025-10-17 07:18:10 -07:00
sg2042-mcu.c
sht3x.c hwmon: (sht3x) add support for SHT85 2026-01-31 07:38:31 -08:00
sht4x.c hwmon: (sht4x) Rely on subsystem locking 2025-10-17 05:59:12 -07:00
sht15.c
sht21.c hwmon: (sht21) Add devicetree support 2025-09-09 05:26:11 -07:00
shtc1.c
sis5595.c
sl28cpld-hwmon.c
smpro-hwmon.c
smsc47b397.c
smsc47m1.c
smsc47m192.c
sparx5-temp.c
spd5118.c hwmon: (spd5118) Detect and support 16-bit register addressing 2025-04-23 07:18:27 -07:00
stts751.c
surface_fan.c
surface_temp.c
sy7636a-hwmon.c hwmon: sy7636a: Fix regulator_enable resource leak on error path 2025-11-26 09:03:15 -08:00
tc74.c
tc654.c
thmc50.c
tmp102.c hwmon: (tmp102) Drop unnecessary include files 2025-10-15 11:02:43 -07:00
tmp103.c hwmon: (tmp103) Drop unnecessary include files 2025-10-15 11:02:43 -07:00
tmp108.c hwmon: (tmp108) Add support for P3T1035 and P3T2030 2026-01-31 07:38:33 -08:00
tmp401.c hwmon: (tmp401) fix overflow caused by default conversion rate value 2025-12-14 09:52:28 -08:00
tmp421.c hwmon: (tmp421) Remove duplicate return in switch-case 2025-11-13 12:23:19 -08:00
tmp464.c hwmon: (tmp464) Rely on subsystem locking 2025-10-15 11:02:43 -07:00
tmp513.c
tps23861.c
tsc1641.c hwmon: Add TSC1641 I2C power monitor driver 2025-11-12 12:09:08 -08:00
ultra45_env.c
vexpress-hwmon.c
via-cputemp.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
via686a.c
vt1211.c hwmon: (vt1211) Convert macros to functions to avoid TOCTOU 2025-11-21 07:50:18 -08:00
vt8231.c hwmon: (vt8231) Convert macros to functions to avoid TOCTOU 2025-11-24 11:47:45 -08:00
w83l785ts.c
w83l786ng.c hwmon: (w83l786ng) Convert macros to functions to avoid TOCTOU 2025-11-28 08:30:24 -08:00
w83627ehf.c hwmon: (w83627ehf) make the read-only arrays 'bit' static const 2025-07-20 16:38:34 -07:00
w83627hf.c
w83773g.c
w83781d.c hwmon/w83781d: Drop REALLY_SLOW_IO setting 2025-11-26 09:04:42 -08:00
w83791d.c hwmon: (w83791d) Convert macros to functions to avoid TOCTOU 2025-12-07 14:10:18 -08:00
w83792d.c
w83793.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
w83795.c
wm831x-hwmon.c
wm8350-hwmon.c
xgene-hwmon.c hwmon: (xgene-hwmon) Simplify PCC shared memory region handling 2025-04-23 07:18:27 -07:00