linux/drivers/infiniband/hw/hns
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
..
hns_roce_ah.c RDMA/hns: Fix RoCEv1 failure due to DSCP 2026-01-04 10:09:51 -05:00
hns_roce_alloc.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
hns_roce_bond.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
hns_roce_bond.h RDMA/hns: Add delayed work for bonding 2025-11-24 02:58:30 -05:00
hns_roce_cmd.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
hns_roce_cmd.h RDMA/hns: Append SCC context to the raw dump of QPC 2024-03-07 11:26:10 +02:00
hns_roce_common.h RDMA/hns: Remove support for HIP06 2022-01-05 15:50:56 -04:00
hns_roce_cq.c RDMA/hns: Introduce limit_bank mode with better performance 2025-12-31 05:33:34 -05:00
hns_roce_db.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
hns_roce_debugfs.c RDMA/hns: Modify debugfs name 2024-10-30 14:13:55 +02:00
hns_roce_debugfs.h RDMA/hns: Support SW stats with debugfs 2023-11-19 14:55:43 +02:00
hns_roce_device.h RDMA/hns: Introduce limit_bank mode with better performance 2025-12-31 05:33:34 -05:00
hns_roce_hem.c Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
hns_roce_hem.h RDMA/hns: Use complete parentheses in macros 2024-04-16 15:06:47 +03:00
hns_roce_hw_v2.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
hns_roce_hw_v2.h RDMA/hns: Implement bonding init/uninit process 2025-11-24 02:58:30 -05:00
hns_roce_main.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
hns_roce_mr.c Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
hns_roce_pd.c RDMA/hns: Add helpers to obtain netdev and bus_num from hr_dev 2025-11-24 02:58:29 -05:00
hns_roce_qp.c RDMA/hns: Introduce limit_bank mode with better performance 2025-12-31 05:33:34 -05:00
hns_roce_restrack.c RDMA/hns: Return actual error code instead of fixed EINVAL 2026-01-04 10:09:51 -05:00
hns_roce_srq.c RDMA/hns: Add helpers to obtain netdev and bus_num from hr_dev 2025-11-24 02:58:29 -05:00
hns_roce_trace.h RDMA/hns: Fix endian issue in trace events 2025-05-25 06:24:21 -04:00
Kconfig RDMA/hns: Clean up the legacy CONFIG_INFINIBAND_HNS 2025-01-06 08:41:06 -05:00
Makefile RDMA/hns: Initialize bonding resources 2025-11-24 02:58:29 -05:00