linux/drivers/firmware
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
..
arm_ffa treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
arm_scmi treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
broadcom mm.git review status for linus..mm-nonmm-stable 2026-02-12 12:13:01 -08:00
cirrus treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
efi treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
google treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
imx firmware: imx: sm-misc: Dump syslog info 2026-01-17 10:32:21 +08:00
meson firmware: firmware: meson-sm: fix compile-test default 2025-09-10 09:31:20 +02:00
microchip treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
psci treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
qcom treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
samsung firmware: exynos-acpm: register ACPM clocks pdev 2025-10-20 08:49:50 +02:00
smccc treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
tegra firmware: tegra: Do not warn on missing memory-region property 2025-09-15 18:28:09 +02:00
xilinx treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
arm_scpi.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
arm_sdei.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
dmi-id.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
dmi-sysfs.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
dmi_scan.c firmware: dmi: Mark bin_attributes as __ro_after_init 2025-02-21 09:20:30 +01:00
edd.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
iscsi_ibft.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
iscsi_ibft_find.c iscsi_ibft: Fix finding the iBFT under Xen Dom 0 2023-06-26 07:47:11 +02:00
Kconfig soc: drivers for 6.16 2025-05-31 07:53:30 -07:00
Makefile soc: driver updates for 6.15, part 1 2025-03-27 09:05:55 -07:00
memmap.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
mtk-adsp-ipc.c firmware: Switch back to struct platform_driver::remove() 2024-11-12 12:55:56 +01:00
qemu_fw_cfg.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
raspberrypi.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
stratix10-rsu.c firmware: stratix10-rsu: replace scnprintf() with sysfs_emit() in *_show() functions 2025-11-13 06:32:58 -06:00
stratix10-svc.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
sysfb.c sysfb: Pass sysfb_primary_display to devices 2025-12-16 14:12:44 +01:00
sysfb_simplefb.c efi: sysfb_efi: Reduce number of references to global screen_info 2025-12-16 14:12:44 +01:00
thead,th1520-aon.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
ti_sci.c firmware: ti_sci: Partial-IO support 2025-11-13 13:03:55 -06:00
ti_sci.h firmware: ti_sci.h: fix all kernel-doc warnings 2025-12-15 07:16:51 -06:00
trusted_foundations.c
turris-mox-rwtm.c firmware: turris-mox-rwtm: Add support for ECDSA signatures with HW private key 2025-03-20 17:56:57 +01:00