linux/drivers/platform/x86
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
..
amd Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
dell Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
hp Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
intel Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
lenovo Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
siemens platform/x86: Switch back to struct platform_driver::remove() 2024-10-17 12:39:32 +03:00
tuxedo platform/x86/tuxedo: Prevent invalid Kconfig state 2025-05-14 13:01:28 +03:00
uniwill Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
x86-android-tablets Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
acer-wireless.c
acer-wmi.c platform/x86: acer-wmi: Fix missing capability check 2026-01-20 17:10:56 +02:00
acerhdf.c thermal/drivers/acerhdf: Constify struct thermal_zone_device_ops 2025-05-26 15:31:27 +03:00
adv_swbutton.c platform/x86: Switch back to struct platform_driver::remove() 2024-10-17 12:39:32 +03:00
amilo-rfkill.c platform/x86: Switch back to struct platform_driver::remove() 2024-10-17 12:39:32 +03:00
apple-gmux.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
asus-armoury.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
asus-armoury.h platform/x86: asus-armoury: add support for GA403WW 2026-01-20 16:56:53 +02:00
asus-laptop.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
asus-nb-wmi.c platform/x86: asus-nb-wmi: Add keymap for display toggle 2025-12-22 16:06:50 +02:00
asus-tf103c-dock.c irqdomain: platform/x86: Switch to irq_domain_create_linear() 2025-03-21 17:47:56 +02:00
asus-wireless.c
asus-wmi.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
asus-wmi.h platform/x86: asus-wmi: Fix ROG button mapping, tablet mode on ASUS ROG Z13 2025-08-25 14:13:55 +03:00
ayaneo-ec.c platform/x86: ayaneo-ec: Add suspend hook 2025-11-21 17:36:22 +02:00
barco-p50-gpio.c platform/x86: barco-p50-gpio: use software nodes for gpio-leds/keys 2025-09-26 14:26:45 +03:00
classmate-laptop.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
compal-laptop.c platform/x86: compal-laptop: Do not include <linux/fb.h> 2025-02-03 14:59:04 +02:00
dasharo-acpi.c platform/x86: Introduce dasharo-acpi platform driver 2025-05-08 16:03:18 +03:00
dual_accel_detect.h
eeepc-laptop.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
eeepc-wmi.c platform/x86: eeepc-wmi: Use backlight power constants 2024-08-12 16:27:11 +02:00
firmware_attributes_class.c platform/x86: firmware_attributes_class: Drop lifecycle functions 2025-01-09 13:40:27 +02:00
firmware_attributes_class.h platform/x86: firmware_attributes_class: Drop lifecycle functions 2025-01-09 13:40:27 +02:00
fujitsu-laptop.c platform/x86: fujitsu: clamp charge_control_end_threshold values to 50 2025-06-13 12:33:28 +03:00
fujitsu-tablet.c
gigabyte-wmi.c MAINTAINERS: consistently use my dedicated email address 2025-04-01 14:21:02 +03:00
gpd-pocket-fan.c platform: x86: replace use of system_wq with system_percpu_wq 2025-11-28 12:07:00 +02:00
hdaps.c
huawei-wmi.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
ibm_rtl.c platform/x86: ibm_rtl: fix EBDA signature search pointer arithmetic 2025-12-22 16:19:19 +02:00
inspur_platform_profile.c ACPI: platform_profile: Remove platform_profile_handler from exported symbols 2025-01-17 19:15:59 +02:00
intel_ips.c treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
intel_ips.h
intel_scu_ipc.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
intel_scu_ipcutil.c platform/x86: intel_scu_ipc: Move intel_scu_ipc.h out of arch/x86/include/asm 2024-09-11 14:26:03 +02:00
intel_scu_pcidrv.c platform/x86: intel_scu_ipc: Move intel_scu_ipc.h out of arch/x86/include/asm 2024-09-11 14:26:03 +02:00
intel_scu_pltdrv.c platform/x86: intel_scu_ipc: Move intel_scu_ipc.h out of arch/x86/include/asm 2024-09-11 14:26:03 +02:00
intel_scu_wdt.c platform/x86: intel_scu_wdt: Move intel_scu_wdt.h to x86 subfolder 2024-09-11 14:26:08 +02:00
Kconfig Merge branch 'fixes' of into for-next 2025-12-01 11:53:59 +02:00
lg-laptop.c platform/x86: lg-laptop: Recognize 2022-2025 models 2026-01-26 16:44:40 +02:00
Makefile platform/x86: ayaneo-ec: Add Ayaneo Embedded Controller platform driver 2025-11-21 17:36:12 +02:00
meegopad_anx7428.c platform/x86: Add new MeeGoPad ANX7428 Type-C Cross Switch driver 2024-05-15 10:07:11 +02:00
meraki-mx100.c platform/x86: meraki-mx100: Use static device properties 2025-09-26 14:26:46 +03:00
msi-ec.c platform-drivers-x86 for v6.7-1 2023-10-31 17:53:00 -10:00
msi-ec.h
msi-laptop.c platform/x86: msi-laptop: add missing sysfs_remove_group() 2025-12-22 16:17:49 +02:00
msi-wmi-platform.c platform/x86: msi-wmi-platform: Fix typo in WMI GUID 2025-11-10 19:13:29 +02:00
msi-wmi.c platform/x86: wmi: Pass event data directly to legacy notify handlers 2024-09-05 17:21:59 +02:00
mxm-wmi.c
nvidia-wmi-ec-backlight.c
oxpec.c platform/x86: ayaneo-ec: Move Ayaneo devices from oxpec to ayaneo-ec 2025-11-21 17:36:20 +02:00
p2sb.c p2sb: Do not scan and remove the P2SB device when it is unhidden 2024-12-10 16:24:51 +02:00
panasonic-laptop.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
pcengines-apuv2.c platform/x86: pcengines-apuv2: Use static device properties 2025-09-26 14:26:48 +03:00
pmc_atom.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
portwell-ec.c platform/x86: portwell-ec: Add hwmon support for voltage and temperature 2025-09-16 12:26:39 +03:00
quickstart.c platform/x86: quickstart: Use devm_mutex_init() 2025-09-08 13:13:41 +03:00
redmi-wmi.c platform/x86: Add WMI driver for Redmibook keyboard 2025-08-28 14:53:30 +03:00
samsung-galaxybook.c platform/x86: samsung-galaxybook: Fix problematic pointer cast 2025-12-29 12:55:50 +02:00
samsung-laptop.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
samsung-q10.c platform/x86: Switch back to struct platform_driver::remove() 2024-10-17 12:39:32 +03:00
sel3350-platform.c platform/x86: Switch back to struct platform_driver::remove() 2024-10-17 12:39:32 +03:00
serdev_helpers.h platform/x86: serdev_helpers: Add get_serdev_controller_from_parent() helper 2024-12-10 15:17:48 +02:00
serial-multi-instantiate.c platform/x86: serial-multi-instantiate: Add IRQ_RESOURCE_OPT for IRQ missing projects 2025-11-27 11:50:57 +02:00
silicom-platform.c treewide: rename GPIO set callbacks back to their original names 2025-08-07 10:07:06 +02:00
sony-laptop.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
system76_acpi.c
topstar-laptop.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
toshiba_acpi.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
toshiba_bluetooth.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
toshiba_haps.c platform/x86: toshiba_haps: Fix memory leaks in add/remove routines 2026-01-26 16:38:45 +02:00
toshiba-wmi.c platform/x86: wmi: Pass event data directly to legacy notify handlers 2024-09-05 17:21:59 +02:00
touchscreen_dmi.c platform/x86: touchscreen_dmi: Add info for SARY Tab 3 tablet 2024-12-11 15:58:35 +02:00
uv_sysfs.c Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
winmate-fm07-keys.c
wireless-hotkey.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
wmi-bmof.c platform/x86: wmi-bmof: Use new buffer-based WMI API 2026-01-20 15:47:58 +02:00
xiaomi-wmi.c platform/x86: xiaomi-wmi: Use new buffer-based WMI API 2026-01-20 15:47:57 +02:00
xo1-rfkill.c platform/x86: Switch back to struct platform_driver::remove() 2024-10-17 12:39:32 +03:00
xo15-ebook.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00