linux/drivers/net/ethernet/sfc
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
..
falcon Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
siena Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
bitfield.h
ef10.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
ef10_regs.h
ef10_sriov.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
ef10_sriov.h
ef100.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
ef100.h
ef100_ethtool.c net: sfc: efx: convert to use .get_rx_ring_count 2026-01-23 10:53:06 -08:00
ef100_ethtool.h
ef100_netdev.c sfc: fix NULL dereferences in ef100_process_design_param() 2025-04-03 15:08:25 -07:00
ef100_netdev.h
ef100_nic.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
ef100_nic.h
ef100_regs.h
ef100_rep.c netdev_features: convert NETIF_F_LLTX to dev->lltx 2024-09-03 11:36:43 +02:00
ef100_rep.h
ef100_rx.c sfc: add per-queue RX bytes stats 2024-10-06 16:02:23 +01:00
ef100_rx.h
ef100_sriov.c
ef100_sriov.h
ef100_tx.c net: gso: restore ids of outer ip headers correctly 2025-09-25 12:42:49 +02:00
ef100_tx.h
efx.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
efx.h sfc: Remove more unused functions 2024-11-05 17:35:11 -08:00
efx_channels.c Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
efx_channels.h sfc: implement per-queue rx drop and overrun stats 2024-10-06 16:02:23 +01:00
efx_common.c Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
efx_common.h sfc: Remove more unused functions 2024-11-05 17:35:11 -08:00
efx_devlink.c sfc: parse headers of devlink flash images 2025-02-11 17:12:17 -08:00
efx_devlink.h
efx_reflash.c sfc: support X4 devlink flash 2025-03-25 07:55:11 -07:00
efx_reflash.h sfc: parse headers of devlink flash images 2025-02-11 17:12:17 -08:00
enum.h
ethtool.c net: sfc: efx: convert to use .get_rx_ring_count 2026-01-23 10:53:06 -08:00
ethtool_common.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
ethtool_common.h net: sfc: efx: convert to use .get_rx_ring_count 2026-01-23 10:53:06 -08:00
filter.h
fw_formats.h sfc: parse headers of devlink flash images 2025-02-11 17:12:17 -08:00
io.h sfc: remove efx_writed_page_locked 2024-12-19 19:14:39 -08:00
Kconfig sfc: document devlink flash support 2025-02-11 17:12:17 -08:00
mae.c Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
mae.h sfc: Remove unused efx_mae_mport_vf 2024-11-05 17:35:11 -08:00
mae_counter_format.h
Makefile sfc: parse headers of devlink flash images 2025-02-11 17:12:17 -08:00
mcdi.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
mcdi.h sfc: extend NVRAM MCDI handlers 2025-02-11 17:12:17 -08:00
mcdi_filters.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
mcdi_filters.h sfc: use new rxfh_context API 2024-06-28 18:53:21 -07:00
mcdi_functions.c
mcdi_functions.h
mcdi_mon.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
mcdi_pcol.h net: Fix typos 2025-07-25 10:29:07 -07:00
mcdi_pcol_mae.h
mcdi_port.c sfc: rip out MDIO support 2025-03-25 07:55:10 -07:00
mcdi_port.h
mcdi_port_common.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
mcdi_port_common.h
mtd.c
net_driver.h sfc: eliminate xdp_rxq_info_valid using XDP base API 2025-07-01 17:01:15 -07:00
nic.c net: sfc: use ethtool string helpers 2024-11-09 09:10:37 -08:00
nic.h sfc: correct kernel-doc complaints 2026-01-08 18:04:18 -08:00
nic_common.h net: sfc: use ethtool string helpers 2024-11-09 09:10:37 -08:00
ptp.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
ptp.h net: sfc: use ethtool string helpers 2024-11-09 09:10:37 -08:00
rx.c sfc: add per-queue RX bytes stats 2024-10-06 16:02:23 +01:00
rx_common.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
rx_common.h sfc: use new rxfh_context API 2024-06-28 18:53:21 -07:00
selftest.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
selftest.h
sriov.c
sriov.h
tc.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
tc.h
tc_bindings.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
tc_bindings.h
tc_conntrack.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
tc_conntrack.h
tc_counters.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
tc_counters.h
tc_encap_actions.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
tc_encap_actions.h
tx.c sfc: Remove more unused functions 2024-11-05 17:35:11 -08:00
tx.h sfc: Remove more unused functions 2024-11-05 17:35:11 -08:00
tx_common.c Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
tx_common.h sfc: account XDP TXes in netdev base stats 2024-10-06 16:02:23 +01:00
tx_tso.c net: adopt skb_network_offset() and similar helpers 2024-03-04 08:47:06 +00:00
workarounds.h