linux/drivers/thermal
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
..
broadcom thermal/drivers/broadcom: Use clamp to simplify bcm2835_thermal_temp2adc 2026-01-21 17:04:41 +01:00
intel Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
mediatek thermal/drivers/mediatek/lvts_thermal: Add mt7987 support 2026-01-20 20:55:03 +01:00
qcom thermal/qcom/lmh: Replace IRQF_ONESHOT with IRQF_NO_THREAD 2026-02-01 17:37:16 +01:00
renesas thermal: renesas: rzg3e: add support for RZ/T2H and RZ/N2H 2026-01-21 19:06:57 +01:00
samsung
st thermal/drivers/stm32: Use predefined HZ_PER_MHZ instead of a custom one 2026-01-21 16:29:23 +01:00
tegra thermal/drivers/tegra: Add Tegra114 specific SOCTHERM driver 2025-09-25 22:11:00 +02:00
testing Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
ti-soc-thermal
Kconfig thermal/drivers/imx91: Add support for i.MX91 thermal monitoring unit 2025-11-26 15:51:28 +01:00
Makefile thermal/drivers/imx91: Add support for i.MX91 thermal monitoring unit 2025-11-26 15:51:28 +01:00
airoha_thermal.c
amlogic_thermal.c
armada_thermal.c thermal: Constify struct thermal_zone_device_ops 2025-07-15 15:26:04 +02:00
cpufreq_cooling.c Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
cpuidle_cooling.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
da9062-thermal.c thermal: Constify struct thermal_zone_device_ops 2025-07-15 15:26:04 +02:00
db8500_thermal.c
devfreq_cooling.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
dove_thermal.c thermal: Constify struct thermal_zone_device_ops 2025-07-15 15:26:04 +02:00
gov_bang_bang.c
gov_fair_share.c
gov_power_allocator.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
gov_step_wise.c thermal: gov_step_wise: Allow cooling level to be reduced earlier 2025-09-04 21:28:01 +02:00
gov_user_space.c
hisi_thermal.c
imx8mm_thermal.c
imx91_thermal.c thermal/drivers/imx91: Add support for i.MX91 thermal monitoring unit 2025-11-26 15:51:28 +01:00
imx_sc_thermal.c
imx_thermal.c thermal: Constify struct thermal_zone_device_ops 2025-07-15 15:26:04 +02:00
k3_bandgap.c
k3_j72xx_bandgap.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
khadas_mcu_fan.c
kirkwood_thermal.c thermal: Constify struct thermal_zone_device_ops 2025-07-15 15:26:04 +02:00
loongson2_thermal.c thermal/drivers/loongson2: Constify struct thermal_zone_device_ops 2025-07-15 15:23:38 +02:00
max77620_thermal.c
pcie_cooling.c
qoriq_thermal.c
rockchip_thermal.c thermal/drivers/rockchip: Shut up GRF warning 2025-09-25 22:11:00 +02:00
spear_thermal.c thermal: Constify struct thermal_zone_device_ops 2025-07-15 15:26:04 +02:00
sprd_thermal.c
sun8i_thermal.c
thermal-generic-adc.c thermal/drivers/thermal-generic-adc: Add temperature sensor channel 2025-09-25 22:11:00 +02:00
thermal_core.c Convert 'alloc_flex' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
thermal_core.h thermal: core: thermal_core.h: fix all kernel-doc warnings 2026-01-28 22:07:27 +01:00
thermal_debugfs.c Convert 'alloc_flex' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
thermal_debugfs.h
thermal_helpers.c
thermal_hwmon.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
thermal_hwmon.h
thermal_mmio.c
thermal_netlink.c
thermal_netlink.h
thermal_of.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
thermal_sysfs.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
thermal_thresholds.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
thermal_thresholds.h
thermal_trace.h
thermal_trace_ipa.h
thermal_trip.c
uniphier_thermal.c