[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMuHMdUuN2vML5jzzU54oqAeViz3w-qJ64Pqn+X0D_mGE0W-ig@mail.gmail.com>
Date: Wed, 3 Sep 2025 13:54:24 +0200
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Tommaso Merciai <tommaso.merciai.xr@...renesas.com>
Cc: tomm.merciai@...il.com, linux-renesas-soc@...r.kernel.org,
biju.das.jz@...renesas.com, Michael Turquette <mturquette@...libre.com>,
Stephen Boyd <sboyd@...nel.org>, Philipp Zabel <p.zabel@...gutronix.de>, linux-clk@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 1/5] clk: renesas: rzg2l: Simplify rzg2l_cpg_assert()
and rzg2l_cpg_deassert()
Hi Tommaso,
On Wed, 3 Sept 2025 at 10:28, Tommaso Merciai
<tommaso.merciai.xr@...renesas.com> wrote:
> Combine common code from rzg2l_cpg_assert() and rzg2l_cpg_deassert() into a
> new __rzg2l_cpg_assert() helper to avoid code duplication. This reduces
> maintenance effort and improves code clarity.
>
> Reviewed-by: Geert Uytterhoeven <geert+renesas@...der.be>
> Signed-off-by: Tommaso Merciai <tommaso.merciai.xr@...renesas.com>
> ---
> v1->v2:
> - Collected GUytterhoeven tag
> - Simplify polling condition in __rzg2l_cpg_assert()
Thanks, will queue in renesas-clk for v6.18...
> --- a/drivers/clk/renesas/rzg2l-cpg.c
> +++ b/drivers/clk/renesas/rzg2l-cpg.c
> @@ -1664,37 +1668,20 @@ static int rzg2l_cpg_assert(struct reset_controller_dev *rcdev,
> }
>
> return readl_poll_timeout_atomic(priv->base + reg, value,
> - value & mask, 10, 200);
> + assert == !!(value & mask),
> + 10, 200);
... with these lines folded into a single line.
> +}
> +
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Powered by blists - more mailing lists