mirror-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
tuxedo
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
Kconfig Merge branch 'fixes' of into for-next 2025-12-01 11:53:59 +02:00
Makefile platform/x86: ayaneo-ec: Add Ayaneo Embedded Controller platform driver 2025-11-21 17:36:12 +02: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
adv_swbutton.c
amilo-rfkill.c
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
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
ayaneo-ec.c platform/x86: ayaneo-ec: Add suspend hook 2025-11-21 17:36:22 +02:00
barco-p50-gpio.c
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
dasharo-acpi.c
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
firmware_attributes_class.c
firmware_attributes_class.h
fujitsu-laptop.c
fujitsu-tablet.c
gigabyte-wmi.c
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
intel_ips.c
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
intel_scu_pcidrv.c
intel_scu_pltdrv.c
intel_scu_wdt.c
lg-laptop.c platform/x86: lg-laptop: Recognize 2022-2025 models 2026-01-26 16:44:40 +02:00
meegopad_anx7428.c
meraki-mx100.c
msi-ec.c
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
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
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
quickstart.c
redmi-wmi.c
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
sel3350-platform.c
serdev_helpers.h
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
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-wmi.c
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
touchscreen_dmi.c
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
xo15-ebook.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00