linux/drivers/dax
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
..
hmem dax/hmem, e820, resource: Defer Soft Reserved insertion until hmem is ready 2026-01-16 09:02:36 -07:00
bus.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
bus.h dax/kmem: allow kmem to add memory with memmap_on_memory 2023-12-10 16:51:35 -08:00
cxl.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
dax-private.h drivers/dax: add some missing kerneldoc comment fields for struct dev_dax 2026-01-14 22:16:26 -08:00
device.c mm: update all remaining mmap_prepare users to use vma_flags_t 2026-02-12 15:42:58 -08:00
Kconfig mm: make range-to-target_node lookup facility a part of numa_memblks 2024-09-03 21:15:32 -07:00
kmem.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
Makefile cxl/dax: Create dax devices for CXL RAM regions 2023-02-10 17:33:45 -08:00
pmem.c mm: remove callers of pfn_t functionality 2025-07-09 22:42:19 -07:00
super.c Coccinelle-based conversion to use ->i_state accessors 2025-10-20 20:22:26 +02:00