linux/kernel/power
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
..
autosleep.c PM: sleep: autosleep: don't include 'pm_wakeup.h' directly 2024-12-05 12:14:26 +01:00
console.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
em_netlink.c PM: EM: Add dump to get-perf-domains in the EM YNL spec 2026-01-09 21:44:46 +01:00
em_netlink.h PM: EM: Implement em_notify_pd_created/updated() 2025-10-22 21:44:38 +02:00
em_netlink_autogen.c PM: EM: Add dump to get-perf-domains in the EM YNL spec 2026-01-09 21:44:46 +01:00
em_netlink_autogen.h PM: EM: Add dump to get-perf-domains in the EM YNL spec 2026-01-09 21:44:46 +01:00
energy_model.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
hibernate.c Merge branch 'pm-sleep' 2025-11-28 16:01:13 +01:00
Kconfig PM: QoS: Introduce a CPU system wakeup QoS limit 2025-11-25 19:01:29 +01:00
main.c PM: sleep: Do not flag runtime PM workqueue as freezable 2025-12-15 12:20:02 +01:00
Makefile PM: EM: Add a skeleton code for netlink notification 2025-10-22 21:44:37 +02:00
power.h PM: sleep: Add support for wakeup during filesystem sync 2025-11-20 22:29:40 +01:00
poweroff.c tty: sysrq: switch sysrq handlers from int to u8 2023-07-25 19:21:03 +02:00
process.c Revert "PM: sleep: Make pm_wakeup_clear() call more clear" 2025-10-23 12:48:04 +02:00
qos.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
snapshot.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
suspend.c PM: sleep: Fix suspend_test() at the TEST_CORE level 2025-12-28 13:01:39 +01:00
suspend_test.c rtc: class: make rtc_class constant 2024-03-08 12:05:10 +01:00
swap.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
user.c PM: sleep: Call pm_sleep_fs_sync() instead of ksys_sync_helper() 2025-11-20 22:29:40 +01:00
wakelock.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00