linux/drivers/devfreq
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
..
event PM / devfreq: rockchip-dfi: switch to FIELD_PREP_WM16 macro 2025-10-15 10:39:54 -04:00
Kconfig PM / devfreq: Add HiSilicon uncore frequency scaling driver 2025-07-14 20:23:57 +09:00
Makefile PM / devfreq: Add HiSilicon uncore frequency scaling driver 2025-07-14 20:23:57 +09:00
devfreq-event.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
devfreq.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
exynos-bus.c PM / devfreq: exynos: remove unused function parameter 2025-01-11 21:03:07 +09:00
governor_passive.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
governor_performance.c PM / devfreq: Move governor.h to a public header location 2025-11-24 00:02:01 +09:00
governor_powersave.c PM / devfreq: Move governor.h to a public header location 2025-11-24 00:02:01 +09:00
governor_simpleondemand.c PM / devfreq: Fix typo in DFSO_DOWNDIFFERENTIAL macro name 2025-11-26 13:58:59 +09:00
governor_userspace.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
hisi_uncore_freq.c PM / devfreq: hisi: Fix potential UAF in OPP handling 2025-11-24 00:02:07 +09:00
imx-bus.c PM / devfreq: imx-bus: Use of_property_present() 2024-09-05 01:23:56 +09:00
imx8m-ddrc.c PM / devfreq: Explicitly include correct DT includes 2023-07-24 05:19:26 +09:00
mtk-cci-devfreq.c PM / devfreq: mtk-cci: avoid redundant conditions 2025-09-08 17:19:25 +09:00
rk3399_dmc.c Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
sun8i-a33-mbus.c PM / devfreq: sun8i-a33-mbus: Simplify by using more devm functions 2025-07-14 20:04:17 +09:00
tegra30-devfreq.c PM / devfreq: tegra30: use min to simplify actmon_cpu_to_emc_rate 2025-11-24 00:02:07 +09:00