linux/drivers/clk
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
..
actions clk: actions: owl-divider: convert from divider_round_rate() to divider_determine_rate() 2026-01-22 10:48:25 -05:00
analogbits clk: analogbits: Fix incorrect calculation of vco rate delta 2025-01-16 13:43:49 -08:00
aspeed treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
at91 treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
axis treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
axs10x treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
baikal-t1 treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
bcm treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
berlin treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
davinci treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
hisilicon treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
imgtec treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
imx treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
ingenic treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
keystone treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
mediatek treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
meson treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
microchip cleanups and fixes 2026-02-16 09:30:44 -08:00
mmp treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
mstar clk: mstar: msc313-cpupll: convert from round_rate() to determine_rate() 2025-09-08 09:41:30 -04:00
mvebu treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
mxs treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
nuvoton clk: nuvoton: ma35d1-divider: convert from divider_round_rate() to divider_determine_rate() 2026-01-22 10:48:25 -05:00
nxp treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
pistachio treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
pxa treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
qcom treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
ralink treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
renesas treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
rockchip treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
samsung treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
sifive clk: sifive: sifive-prci: convert from round_rate() to determine_rate() 2025-09-08 09:41:28 -04:00
socfpga treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
sophgo clk: sophgo: sg2042-clkgen: convert from divider_round_rate() to divider_determine_rate() 2026-01-22 10:48:26 -05:00
spacemit treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
spear treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
sprd treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
st treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
starfive treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
stm32 treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
sunxi treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
sunxi-ng treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
tegra treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
thead clk: thead: th1520-ap: Support CPU frequency scaling 2026-01-14 17:26:47 -08:00
ti treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
uniphier
ux500 treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
versatile treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
visconti treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
x86 clk: x86: cgu: convert from divider_round_rate() to divider_determine_rate() 2026-01-22 10:48:26 -05:00
xilinx Merge branch 'clk-determine-rate' into clk-next 2025-10-06 13:02:50 -05:00
zynq treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
zynqmp treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
.kunitconfig clk: Disable KUNIT_UML_PCI 2026-02-02 16:42:07 -08:00
clk-apple-nco.c clk: clk-apple-nco: Add "apple,t8103-nco" compatible 2026-01-15 18:50:26 -08:00
clk-asm9260.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
clk-axi-clkgen.c clk: clk-axi-clkgen: remove unneeded semicolon 2025-08-14 13:27:00 -07:00
clk-axm5516.c clk: remove unneeded 'fast_io' parameter in regmap_config 2025-08-14 12:50:35 -07:00
clk-bd718x7.c clk: clk-bd718x7: Support BD72720 clk gate 2026-01-13 12:50:20 +00:00
clk-bm1880.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
clk-bulk.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
clk-cdce706.c clk: cdce706: convert from round_rate() to determine_rate() 2025-09-08 09:41:30 -04:00
clk-cdce925.c clk: cdce925: convert from round_rate() to determine_rate() 2025-09-08 09:41:26 -04:00
clk-clps711x.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
clk-composite.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
clk-conf.c clk: clk-conf: support assigned-clock-rates-u64 2024-08-16 15:21:19 -07:00
clk-cs2000-cp.c clk: cs2000-cp: convert from round_rate() to determine_rate() 2025-09-08 09:41:26 -04:00
clk-devres.c clk: Add devm_clk_bulk_get_optional_enable() helper 2026-01-21 18:57:07 -08:00
clk-divider.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
clk-en7523.c clk: en7523: Add reset-controller support for EN7523 SoC 2025-11-13 20:05:13 -08:00
clk-ep93xx.c Merge branch 'clk-determine-rate' into clk-next 2025-10-06 13:02:50 -05:00
clk-eyeq.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
clk-fixed-factor.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
clk-fixed-mmio.c clk: Switch back to struct platform_driver::remove() 2024-09-21 14:12:05 -07:00
clk-fixed-rate.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
clk-fixed-rate_test.c clk: Add KUnit tests for clk fixed rate basic type 2024-07-29 15:33:13 -07:00
clk-fixed-rate_test.h clk: Add KUnit tests for clk fixed rate basic type 2024-07-29 15:33:13 -07:00
clk-fractional-divider.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
clk-fractional-divider.h
clk-fractional-divider_test.c clk: test: add missing MODULE_DESCRIPTION() macros 2024-06-03 15:46:46 -07:00
clk-fsl-flexspi.c
clk-fsl-sai.c
clk-gate.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
clk-gate_test.c clk: test: add missing MODULE_DESCRIPTION() macros 2024-06-03 15:46:46 -07:00
clk-gemini.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
clk-gpio.c clk: clk-gpio: add driver for gated-fixed-clocks 2024-10-16 11:20:42 -07:00
clk-hi655x.c
clk-highbank.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
clk-hsdk-pll.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
clk-k210.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
clk-lan966x.c clk: lan966x: remove unused dt-bindings include 2025-11-08 12:01:01 +02:00
clk-lmk04832.c clk: lmk04832: Simplify with scoped for each OF child loop 2026-01-15 18:48:53 -08:00
clk-lochnagar.c
clk-loongson1.c clk: loongson1: convert from divider_round_rate() to divider_determine_rate() 2026-01-22 10:48:25 -05:00
clk-loongson2.c clk: loongson2: Add clock definitions for Loongson-2K0300 SoC 2025-09-21 12:48:51 -07:00
clk-max9485.c clk: max9485: convert from round_rate() to determine_rate() 2025-09-08 09:41:27 -04:00
clk-max77686.c
clk-milbeaut.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
clk-moxart.c
clk-multiplier.c clk: multiplier: convert from round_rate() to determine_rate() 2025-09-08 09:41:27 -04:00
clk-mux.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
clk-nomadik.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
clk-npcm7xx.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
clk-npcm8xx.c clk: npcm8xx: add clock controller 2024-10-17 15:17:51 -07:00
clk-nspire.c
clk-palmas.c clk: Switch back to struct platform_driver::remove() 2024-09-21 14:12:05 -07:00
clk-plldig.c
clk-pwm.c clk: pwm: Make use of non-sleeping PWMs 2025-06-19 18:09:58 -07:00
clk-qoriq.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
clk-renesas-pcie.c clk: rs9: Convert to DEFINE_SIMPLE_DEV_PM_OPS() 2026-02-02 16:35:56 -08:00
clk-rk808.c
clk-rp1.c clk: rp1: convert from round_rate() to determine_rate() 2025-09-03 14:58:19 -07:00
clk-rpmi.c clk: Add clock driver for the RISC-V RPMI clock service group 2025-09-25 13:16:48 -06:00
clk-s2mps11.c clk: s2mps11: add support for S2MPG10 PMIC clock 2025-09-21 10:43:18 -07:00
clk-scmi.c Merge branch 'clk-determine-rate' into clk-next 2025-10-06 13:02:50 -05:00
clk-scpi.c clk: scpi: Simplify with scoped for each OF child loop 2026-01-15 18:48:54 -08:00
clk-si514.c clk: si514: convert from round_rate() to determine_rate() 2025-09-08 09:41:28 -04:00
clk-si521xx.c clk: si521xx: convert from round_rate() to determine_rate() 2025-09-08 09:41:28 -04:00
clk-si544.c clk: si544: convert from round_rate() to determine_rate() 2025-09-08 09:41:28 -04:00
clk-si570.c clk: si570: convert from round_rate() to determine_rate() 2025-09-08 09:41:28 -04:00
clk-si5341.c clk: si5341: convert from round_rate() to determine_rate() 2025-09-08 09:41:28 -04:00
clk-si5351.c clk: Fix typos 2025-07-26 23:49:18 -07:00
clk-si5351.h
clk-sp7021.c There's a bunch of patches here across drivers/clk/ to migrate drivers to use 2025-10-07 09:28:37 -07:00
clk-sparx5.c clk: sparx5: convert from round_rate() to determine_rate() 2025-09-08 09:41:28 -04:00
clk-stm32f4.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
clk-stm32h7.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
clk-tps68470.c clk: tps68470: convert from round_rate() to determine_rate() 2025-09-08 09:41:29 -04:00
clk-twl.c clk: twl: add TWL6030 support 2024-10-17 12:02:42 -07:00
clk-twl6040.c
clk-versaclock3.c clk: versaclock3: convert from divider_round_rate() to divider_determine_rate() 2026-01-22 10:48:26 -05:00
clk-versaclock5.c clk: versaclock5: convert from round_rate() to determine_rate() 2025-09-08 09:41:31 -04:00
clk-versaclock7.c clk: versaclock7: convert from round_rate() to determine_rate() 2025-09-08 09:41:31 -04:00
clk-vt8500.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
clk-wm831x.c clk: wm831x: convert from round_rate() to determine_rate() 2025-09-08 09:41:29 -04:00
clk-xgene.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
clk.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
clk.h
clk_kunit_helpers.c clk: test: Add test managed of_clk_add_hw_provider() 2024-10-09 16:25:32 -07:00
clk_parent_data_test.h clk: Add KUnit tests for clks registered with struct clk_parent_data 2024-07-29 15:33:13 -07:00
clk_test.c Merge branches 'clk-bindings', 'clk-cleanup', 'clk-pwm', 'clk-hw-device', 'clk-xilinx' and 'clk-adi' into clk-next 2025-07-29 15:18:13 -07:00
clkdev.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
Kconfig Not much changed in the clk framework this time except the clk.h consumer API 2026-02-15 08:18:57 -08:00
kunit_clk_assigned_rates.h clk: test: Add KUnit tests for clock-assigned-rates{-u64} DT properties 2024-10-09 16:25:32 -07:00
kunit_clk_assigned_rates_multiple.dtso clk: test: Add KUnit tests for clock-assigned-rates{-u64} DT properties 2024-10-09 16:25:32 -07:00
kunit_clk_assigned_rates_multiple_consumer.dtso clk: test: Add KUnit tests for clock-assigned-rates{-u64} DT properties 2024-10-09 16:25:32 -07:00
kunit_clk_assigned_rates_null.dtso clk: test: Add KUnit tests for clock-assigned-rates{-u64} DT properties 2024-10-09 16:25:32 -07:00
kunit_clk_assigned_rates_null_consumer.dtso clk: test: Add KUnit tests for clock-assigned-rates{-u64} DT properties 2024-10-09 16:25:32 -07:00
kunit_clk_assigned_rates_one.dtso clk: test: Add KUnit tests for clock-assigned-rates{-u64} DT properties 2024-10-09 16:25:32 -07:00
kunit_clk_assigned_rates_one_consumer.dtso clk: test: Add KUnit tests for clock-assigned-rates{-u64} DT properties 2024-10-09 16:25:32 -07:00
kunit_clk_assigned_rates_u64_multiple.dtso clk: test: Add KUnit tests for clock-assigned-rates{-u64} DT properties 2024-10-09 16:25:32 -07:00
kunit_clk_assigned_rates_u64_multiple_consumer.dtso clk: test: Add KUnit tests for clock-assigned-rates{-u64} DT properties 2024-10-09 16:25:32 -07:00
kunit_clk_assigned_rates_u64_one.dtso clk: test: Add KUnit tests for clock-assigned-rates{-u64} DT properties 2024-10-09 16:25:32 -07:00
kunit_clk_assigned_rates_u64_one_consumer.dtso clk: test: Add KUnit tests for clock-assigned-rates{-u64} DT properties 2024-10-09 16:25:32 -07:00
kunit_clk_assigned_rates_without.dtso clk: test: Add KUnit tests for clock-assigned-rates{-u64} DT properties 2024-10-09 16:25:32 -07:00
kunit_clk_assigned_rates_without_consumer.dtso clk: test: Add KUnit tests for clock-assigned-rates{-u64} DT properties 2024-10-09 16:25:32 -07:00
kunit_clk_assigned_rates_zero.dtso clk: test: Add KUnit tests for clock-assigned-rates{-u64} DT properties 2024-10-09 16:25:32 -07:00
kunit_clk_assigned_rates_zero_consumer.dtso clk: test: Add KUnit tests for clock-assigned-rates{-u64} DT properties 2024-10-09 16:25:32 -07:00
kunit_clk_fixed_rate_test.dtso clk: Add KUnit tests for clk fixed rate basic type 2024-07-29 15:33:13 -07:00
kunit_clk_hw_get_dev_of_node.dtso clk: tests: add clk_hw_get_dev() and clk_hw_get_of_node() tests 2025-06-20 00:15:39 -07:00
kunit_clk_parent_data_test.dtso clk: Add KUnit tests for clks registered with struct clk_parent_data 2024-07-29 15:33:13 -07:00
Makefile clk: aspeed: Move the existing ASPEED clk drivers into aspeed subdirectory. 2026-02-03 21:35:58 -08:00