linux/arch/arc
Kees Cook 69050f8d6d treewide: Replace kmalloc with kmalloc_obj for non-scalar types
This is the result of running the Coccinelle script from
scripts/coccinelle/api/kmalloc_objs.cocci. The script is designed to
avoid scalar types (which need careful case-by-case checking), and
instead replace kmalloc-family calls that allocate struct or union
object instances:

Single allocations:	kmalloc(sizeof(TYPE), ...)
are replaced with:	kmalloc_obj(TYPE, ...)

Array allocations:	kmalloc_array(COUNT, sizeof(TYPE), ...)
are replaced with:	kmalloc_objs(TYPE, COUNT, ...)

Flex array allocations:	kmalloc(struct_size(PTR, FAM, COUNT), ...)
are replaced with:	kmalloc_flex(*PTR, FAM, COUNT, ...)

(where TYPE may also be *VAR)

The resulting allocations no longer return "void *", instead returning
"TYPE *".

Signed-off-by: Kees Cook <kees@kernel.org>
2026-02-21 01:02:28 -08:00
..
boot ARC: migrate to the generic rule for built-in DTB 2025-01-18 08:52:09 +09:00
configs Use CONFIG_EXT4_FS instead of CONFIG_EXT3_FS in all of the defconfigs 2025-10-13 21:50:40 -04:00
include mm.git review status for linus..mm-stable 2026-02-12 11:32:37 -08:00
kernel treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
lib ARCv2: memset: don't prefetch for len == 0 which happens a alot 2023-08-17 12:40:26 -07:00
mm arch, mm: consolidate initialization of nodes, zones and memory map 2026-01-26 20:02:18 -08:00
net treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
plat-axs10x arc: Explicitly include correct DT includes 2023-08-23 22:28:53 -07:00
plat-hsdk arc: Replace lkml.org links with lore 2021-12-28 19:48:49 -08:00
plat-sim ARC: merge HAPS-HS with nSIM-HS configs 2019-10-28 12:12:31 -07:00
plat-tb10x treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 333 2019-06-05 17:37:06 +02:00
Kbuild ARC: Add eBPF JIT support 2024-05-12 16:51:36 -07:00
Kconfig ARC: Always use SWAPE instructions for __arch_swab32() 2026-01-30 16:46:17 +01:00
Kconfig.debug Kconfig: consolidate the "Kernel hacking" menu 2018-08-02 08:06:48 +09:00
Makefile ARC: Always use SWAPE instructions for __arch_swab32() 2026-01-30 16:46:17 +01:00