Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] clk: imx: Drop unnecessary i.MX50 IIM clock toggling
@ 2026-11-29 19:25 Jiawen Liu
  2026-11-30  2:11 ` Krzysztof Kozlowski
  2026-11-30  2:12 ` Peng Fan (OSS)
  0 siblings, 2 replies; 3+ messages in thread
From: Jiawen Liu @ 2026-11-29 19:25 UTC (permalink / raw)
  To: Abel Vesa, Stephen Boyd, Brian Masney, Jerome Brunet, Frank Li,
	Sascha Hauer
  Cc: Peng Fan, Pengutronix Kernel Team, Fabio Estevam, linux-clk, imx,
	linux-arm-kernel

During early boot, mx50_clocks_init() prepares and enables the IIM gate
to print a fixed silicon revision. If IIM gate registration fails,
imx_check_clocks() logs the error and initialization continues.
clk_prepare() then dereferences the error pointer. If preparation of a
valid gate fails, clk_disable_unprepare() still runs and can warn about
missing enable and prepare references.

Drop both IIM clock calls. The revision helper only prints its
arguments, so it can log the fixed revision without the IIM clock.

Verified by source and diff review,
checkpatch, and an ARM imx_v6_v7_defconfig build of clk-imx5.o.
Runtime or hardware reproduction was not performed.

Fixes: 7a9cc1ad213d ("ARM: imx: add clocking support code for the IMX50 SoC")
Signed-off-by: Jiawen Liu <liu1298662399@gmail.com>
---
 drivers/clk/imx/clk-imx5.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/clk/imx/clk-imx5.c b/drivers/clk/imx/clk-imx5.c
index 9c5f489b3975d..a012971e6dee7 100644
--- a/drivers/clk/imx/clk-imx5.c
+++ b/drivers/clk/imx/clk-imx5.c
@@ -351,9 +351,7 @@ static void __init mx50_clocks_init(struct device_node *np)
 	clk_set_rate(clk[IMX5_CLK_ESDHC_A_PODF], 200000000);
 	clk_set_rate(clk[IMX5_CLK_ESDHC_B_PODF], 200000000);
 
-	clk_prepare_enable(clk[IMX5_CLK_IIM_GATE]);
 	imx_print_silicon_rev("i.MX50", IMX_CHIP_REVISION_1_1);
-	clk_disable_unprepare(clk[IMX5_CLK_IIM_GATE]);
 
 	r = clk_round_rate(clk[IMX5_CLK_USBOH3_PER_GATE], 54000000);
 	clk_set_rate(clk[IMX5_CLK_USBOH3_PER_GATE], r);
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] clk: imx: Drop unnecessary i.MX50 IIM clock toggling
  2026-11-29 19:25 [PATCH] clk: imx: Drop unnecessary i.MX50 IIM clock toggling Jiawen Liu
@ 2026-11-30  2:11 ` Krzysztof Kozlowski
  2026-11-30  2:12 ` Peng Fan (OSS)
  1 sibling, 0 replies; 3+ messages in thread
From: Krzysztof Kozlowski @ 2026-11-30  2:11 UTC (permalink / raw)
  To: Jiawen Liu
  Cc: Abel Vesa, Jerome Brunet, Brian Masney, Sascha Hauer,
	Pengutronix Kernel Team, Stephen Boyd, linux-clk, Fabio Estevam,
	linux-arm-kernel, Frank Li, imx, Peng Fan


On Sun, 29 Nov 2026 19:25:33 +0000, Jiawen Liu wrote:
> During early boot, mx50_clocks_init() prepares and enables the IIM gate
> to print a fixed silicon revision. If IIM gate registration fails,
> imx_check_clocks() logs the error and initialization continues.
> clk_prepare() then dereferences the error pointer. If preparation of a
> valid gate fails, clk_disable_unprepare() still runs and can warn about
> missing enable and prepare references.
> 
> Drop both IIM clock calls. The revision helper only prints its
> arguments, so it can log the fixed revision without the IIM clock.
> 
> Verified by source and diff review,
> checkpatch, and an ARM imx_v6_v7_defconfig build of clk-imx5.o.
> Runtime or hardware reproduction was not performed.
> 
> Fixes: 7a9cc1ad213d ("ARM: imx: add clocking support code for the IMX50 SoC")
> Signed-off-by: Jiawen Liu <liu1298662399@gmail.com>
> ---
>  drivers/clk/imx/clk-imx5.c | 2 --
>  1 file changed, 2 deletions(-)
> 

You sent multiple independent patches, to multiple independent
subsystems. The amount of these patches clearly suggest this was
AI generated and most likely not tested.

More importantly, you sent all this work without properly organizing
relevant patches into patchsets. This makes reviewing difficult
and might cause multiple reviewers to address the same issue.
Replying to the entire set is impossible and requires handling each
patch independently, instead of applying or discarding the set.
Maintainers also won't see the bigger picture of your work. Quite
worrying.

Please read kernel documentation BEFORE posting more work. It will
explain you how to identify subsystems, how to organize your work per
subsystem (so a patchset grouping multiple patches with a short cover
letter), how to document the issue discovery method and what was
or was not tested.

Best regards,
Krzysztof






^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] clk: imx: Drop unnecessary i.MX50 IIM clock toggling
  2026-11-29 19:25 [PATCH] clk: imx: Drop unnecessary i.MX50 IIM clock toggling Jiawen Liu
  2026-11-30  2:11 ` Krzysztof Kozlowski
@ 2026-11-30  2:12 ` Peng Fan (OSS)
  1 sibling, 0 replies; 3+ messages in thread
From: Peng Fan (OSS) @ 2026-11-30  2:12 UTC (permalink / raw)
  To: Jiawen Liu
  Cc: Peng Fan, Abel Vesa, Stephen Boyd, Brian Masney, Jerome Brunet,
	Frank Li, Sascha Hauer, Peng Fan, Pengutronix Kernel Team,
	Fabio Estevam, linux-clk, imx, linux-arm-kernel

On Sun, 29 Nov 2026 19:25:33 +0000 Jiawen Liu <liu1298662399@gmail.com> wrote:

> During early boot, mx50_clocks_init() prepares and enables the IIM gate
> to print a fixed silicon revision. If IIM gate registration fails,
> imx_check_clocks() logs the error and initialization continues.
> clk_prepare() then dereferences the error pointer. If preparation of a
> valid gate fails, clk_disable_unprepare() still runs and can warn about
> missing enable and prepare references.
> 
> Drop both IIM clock calls. The revision helper only prints its
> arguments, so it can log the fixed revision without the IIM clock.
> 
> Verified by source and diff review,
> checkpatch, and an ARM imx_v6_v7_defconfig build of clk-imx5.o.
> Runtime or hardware reproduction was not performed.
> 
> Fixes: 7a9cc1ad213d ("ARM: imx: add clocking support code for the IMX50 SoC")
> Signed-off-by: Jiawen Liu <liu1298662399@gmail.com>
> ---
>  drivers/clk/imx/clk-imx5.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/clk/imx/clk-imx5.c b/drivers/clk/imx/clk-imx5.c
> index 9c5f489b3975d..a012971e6dee7 100644
> --- a/drivers/clk/imx/clk-imx5.c
> +++ b/drivers/clk/imx/clk-imx5.c
> @@ -351,9 +351,7 @@ static void __init mx50_clocks_init(struct device_node *np)
>  	clk_set_rate(clk[IMX5_CLK_ESDHC_A_PODF], 200000000);
>  	clk_set_rate(clk[IMX5_CLK_ESDHC_B_PODF], 200000000);
>  
> -	clk_prepare_enable(clk[IMX5_CLK_IIM_GATE]);
>  	imx_print_silicon_rev("i.MX50", IMX_CHIP_REVISION_1_1);
> -	clk_disable_unprepare(clk[IMX5_CLK_IIM_GATE]);
>  

This patch seems generated by LLM tools. Have you read the code? 

Regards
Peng


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-11-30  2:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-29 19:25 [PATCH] clk: imx: Drop unnecessary i.MX50 IIM clock toggling Jiawen Liu
2026-11-30  2:11 ` Krzysztof Kozlowski
2026-11-30  2:12 ` Peng Fan (OSS)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox