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
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
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
adm1029.c
adm1031.c
adm1177.c
adm9240.c
ads7828.c
ads7871.c
adt7x10.c
adt7x10.h
adt7310.c
adt7410.c
adt7411.c
adt7462.c
adt7470.c
adt7475.c
aht10.c
amc6821.c
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
as370-hwmon.c
asb100.c
asc7621.c
aspeed-g6-pwm-tach.c
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
asus_wmi_sensors.c
atxp1.c
axi-fan-control.c
bt1-pvt.c
bt1-pvt.h
cgbc-hwmon.c
chipcap2.c
coretemp.c Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
corsair-cpro.c
corsair-psu.c
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
emc2103.c
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
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
gxp-fan-ctrl.c
hih6130.c
hp-wmi-sensors.c
hs3001.c
htu31.c
hwmon-vid.c
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
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
ina209.c
ina238.c
ina3221.c
intel-m10-bmc-hwmon.c
isl28022.c
it87.c
jc42.c
k8temp.c
k10temp.c
kbatt.c
kfan.c
lan966x-hwmon.c
lenovo-ec-sensors.c
lineage-pem.c
lm63.c
lm70.c
lm73.c
lm75.c
lm75.h
lm77.c
lm78.c
lm80.c
lm83.c
lm85.c
lm87.c
lm90.c
lm92.c
lm93.c
lm95234.c
lm95241.c
lm95245.c
lochnagar-hwmon.c
ltc2945.c
ltc2947-core.c
ltc2947-i2c.c
ltc2947-spi.c
ltc2947.h
ltc2990.c
ltc2991.c
ltc2992.c
ltc4151.c
ltc4215.c
ltc4222.c
ltc4245.c
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
max127.c
max197.c
max1111.c
max1619.c
max1668.c
max6620.c
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
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
max31827.c
max77705-hwmon.c
mc33xs2410_hwmon.c
mc34vr500.c
mc13783-adc.c
mcp3021.c
menf21bmc_hwmon.c
mlxreg-fan.c
mr75203.c
nct6683.c hwmon: (nct6683) Add customer ID for ASRock Z590 Taichi 2026-01-31 07:38:32 -08:00
nct6694-hwmon.c
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
npcm750-pwm-fan.c
nsa320-hwmon.c
ntc_thermistor.c
nzxt-kraken2.c
nzxt-kraken3.c
nzxt-smart2.c
pc87360.c
pc87427.c
pcf8591.c
powerz.c
powr1220.c
pt5161l.c
pwm-fan.c
qnap-mcu-hwmon.c
raspberrypi-hwmon.c
sa67mcu-hwmon.c
sbtsi_temp.c
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
scpi-hwmon.c
sfctemp.c
sg2042-mcu.c
sht3x.c hwmon: (sht3x) add support for SHT85 2026-01-31 07:38:31 -08:00
sht4x.c
sht15.c
sht21.c
shtc1.c
sis5595.c
sl28cpld-hwmon.c
smpro-hwmon.c
smsc47b397.c
smsc47m1.c
smsc47m192.c
sparx5-temp.c
spd5118.c
stts751.c
surface_fan.c
surface_temp.c
sy7636a-hwmon.c
tc74.c
tc654.c
thmc50.c
tmp102.c
tmp103.c
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
tmp464.c
tmp513.c
tps23861.c
tsc1641.c
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
vt8231.c
w83l785ts.c
w83l786ng.c
w83627ehf.c
w83627hf.c
w83773g.c
w83781d.c
w83791d.c
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