linux/drivers/gpu/drm/vkms
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>
History 2026-02-21 01:02:28 -08:00
..
tests drm/vkms: Add tests for CTM handling 2025-11-26 23:03:33 +01:00
Kconfig drm/vkms: Add and remove VKMS instances via configfs 2025-10-22 13:19:25 +02:00
Makefile drm/vkms: Add enumerated 1D curve colorop 2025-11-26 23:03:33 +01:00
vkms_colorop.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
vkms_composer.c drm/atomic: convert drm_atomic_get_{old, new}_colorop_state() into proper functions 2025-12-22 15:37:26 +02:00
vkms_composer.h drm/vkms: Add tests for CTM handling 2025-11-26 23:03:33 +01:00
vkms_config.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
vkms_config.h drm/vkms: Add config for default plane pipeline 2025-11-26 23:03:33 +01:00
vkms_configfs.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
vkms_configfs.h drm/vkms: Add and remove VKMS instances via configfs 2025-10-22 13:19:25 +02:00
vkms_connector.c drm/vkms: Allow to configure connector status via configfs 2025-10-22 13:19:26 +02:00
vkms_connector.h drm/vkms: Allow to configure connector status via configfs 2025-10-22 13:19:26 +02:00
vkms_crtc.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
vkms_drv.c drm/atomic: convert drm_atomic_get_{old, new}_colorop_state() into proper functions 2025-12-22 15:37:26 +02:00
vkms_drv.h drm/vkms: Use s32 for internal color pipeline precision 2025-11-26 23:03:33 +01:00
vkms_formats.c drm/vkms: Add P01* formats 2025-09-05 19:57:26 +02:00
vkms_formats.h drm/vkms: Change YUV helpers to support u16 inputs for conversion 2025-09-05 19:57:25 +02:00
vkms_luts.c drm/vkms: Add enumerated 1D curve colorop 2025-11-26 23:03:33 +01:00
vkms_luts.h drm/vkms: Add enumerated 1D curve colorop 2025-11-26 23:03:33 +01:00
vkms_output.c drm/vkms: Pass plane_cfg to plane initialization 2025-11-26 23:03:32 +01:00
vkms_plane.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
vkms_writeback.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00