linux/drivers/interconnect
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
..
imx interconnect: Switch back to struct platform_driver::remove() 2024-10-22 12:34:18 +03:00
mediatek interconnect: mediatek: Aggregate bandwidth with saturating add 2025-12-21 13:59:54 +02:00
qcom treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
samsung interconnect: exynos: handle node name allocation failure 2025-06-23 17:59:09 +03:00
bulk.c interconnect: add device managed bulk API 2022-07-04 16:14:29 +03:00
core.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
debugfs-client.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
icc-clk.c interconnect: icc-clk: destroy nodes in case of memory allocation failures 2025-06-26 19:18:01 +03:00
icc-kunit.c interconnect: Add kunit tests for core functionality 2026-01-13 16:18:27 +02:00
internal.h Merge branch 'icc-debugfs' into icc-next 2023-08-22 21:05:09 +03:00
Kconfig interconnect: Add kunit tests for core functionality 2026-01-13 16:18:27 +02:00
Makefile interconnect: Add kunit tests for core functionality 2026-01-13 16:18:27 +02:00
trace.h tracing/treewide: Remove second parameter of __assign_str() 2024-05-22 20:14:47 -04:00