linux/drivers/gpu/drm/sysfb
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
..
drm_sysfb.c drm/sysfb: Share helpers for integer validation 2025-04-14 10:16:13 +02:00
drm_sysfb_helper.h drm/sysfb: Remove duplicate declarations 2026-01-14 11:03:56 +01:00
drm_sysfb_modeset.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
drm_sysfb_screen_info.c drm/sysfb: Find screen_info format with helpers 2025-08-26 09:54:17 +02:00
efidrm.c sysfb: Move edid_info into sysfb_primary_display 2025-12-16 14:12:44 +01:00
Kconfig drm/sysfb: efidrm: Support module builds 2025-04-09 09:03:15 +02:00
Makefile drm/sysfb: Share helpers for screen_info validation 2025-04-14 10:16:14 +02:00
ofdrm.c drm: include drm_print.h where needed 2025-10-31 10:34:52 +02:00
simpledrm.c drm: include drm_print.h where needed 2025-10-31 10:34:52 +02:00
vesadrm.c sysfb: Move edid_info into sysfb_primary_display 2025-12-16 14:12:44 +01:00