linux/drivers/net/ethernet/sunplus
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
..
Kconfig net: ethernet: Fix unmet direct dependencies detected for NVMEM_SUNPLUS_OCOTP 2022-05-16 18:02:21 -07:00
Makefile
spl2sw_define.h
spl2sw_desc.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
spl2sw_desc.h
spl2sw_driver.c net: ethernet: sunplus: Switch to ndo_eth_ioctl 2025-01-14 18:09:04 -08:00
spl2sw_int.c net: ethernet: SP7021: fix a use after free of skb->len 2022-05-19 17:46:56 -07:00
spl2sw_int.h
spl2sw_mac.c
spl2sw_mac.h
spl2sw_mdio.c net: Remove C45 check in C22 only MDIO bus drivers 2023-01-20 18:12:45 -08:00
spl2sw_mdio.h
spl2sw_phy.c ethernet: remove superfluous clearing of phydev 2023-03-22 20:47:27 -07:00
spl2sw_phy.h
spl2sw_register.h