All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: tomm.merciai@gmail.com, linux-renesas-soc@vger.kernel.org,
	biju.das.jz@bp.renesas.com, Pavel Machek <pavel@denx.de>,
	Michael Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@kernel.org>, Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Philipp Zabel <p.zabel@pengutronix.de>,
	Magnus Damm <magnus.damm@gmail.com>,
	Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>,
	linux-clk@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/3] clk: renesas: rzv2h: Simplify rzv2h_cpg_assert()/rzv2h_cpg_deassert()
Date: Thu, 10 Apr 2025 18:33:01 +0200	[thread overview]
Message-ID: <Z_fyvYse83Fj1IIK@tom-desktop> (raw)
In-Reply-To: <CAMuHMdVJqtLKBK6hf0iGGHcPaTdZm10GiiqcBpkPrJSq=KL-cw@mail.gmail.com>

Hi Geert,
Thanks for your review.

On Thu, Apr 10, 2025 at 06:25:13PM +0200, Geert Uytterhoeven wrote:
> Hi Tommaso,
> 
> On Mon, 17 Mar 2025 at 09:33, Tommaso Merciai
> <tommaso.merciai.xr@bp.renesas.com> wrote:
> > rzv2h_cpg_assert() and rzv2h_cpg_deassert() functions are similar. Share
> > this code via __rzv2h_cpg_assert(). This avoid code duplication.
> >
> > Reported-by: Pavel Machek <pavel@denx.de>
> > Closes: https://lore.kernel.org/cip-dev/Z9QA9rwuXCuVbOXp@duo.ucw.cz/
> > Signed-off-by: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com>
> 
> Thanks for your patch!
> 
> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
> i.e. will queue in renesas-clk for v6.16.
> 
> > --- a/drivers/clk/renesas/rzv2h-cpg.c
> > +++ b/drivers/clk/renesas/rzv2h-cpg.c
> > @@ -652,16 +652,17 @@ rzv2h_cpg_register_mod_clk(const struct rzv2h_mod_clk *mod,
> >                 mod->name, PTR_ERR(clk));
> >  }
> >
> > -static int rzv2h_cpg_assert(struct reset_controller_dev *rcdev,
> > -                           unsigned long id)
> > +static int __rzv2h_cpg_assert(struct reset_controller_dev *rcdev,
> > +                             unsigned long id, bool assert)
> >  {
> >         struct rzv2h_cpg_priv *priv = rcdev_to_priv(rcdev);
> >         unsigned int reg = GET_RST_OFFSET(priv->resets[id].reset_index);
> >         u32 mask = BIT(priv->resets[id].reset_bit);
> >         u8 monbit = priv->resets[id].mon_bit;
> > -       u32 value = mask << 16;
> > +       u32 value = assert ? (mask << 16) : ((mask << 16) | mask);
> 
> Do you mind if I change this to
> 
>     u32 value = mask << 16;
> 
>     if (!assert)
>             value |= mask;
> 
> while applying?

Fine to me, thanks.

Regards,
Tommaso

> 
> >
> > -       dev_dbg(rcdev->dev, "assert id:%ld offset:0x%x\n", id, reg);
> > +       dev_dbg(rcdev->dev, "%s id:%ld offset:0x%x\n",
> > +               assert ? "assert" : "deassert", id, reg);
> >
> >         writel(value, priv->base + reg);
> >
> 
> Gr{oetje,eeting}s,
> 
>                         Geert
> 
> -- 
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-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

      reply	other threads:[~2025-04-10 16:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-17  8:32 [PATCH 0/3] clk: renesas: rzv2h: Fixes and improvements Tommaso Merciai
2025-03-17  8:32 ` [PATCH 1/3] dt-bindings: clock: renesas: Fix description section Tommaso Merciai
2025-03-17 10:08   ` Geert Uytterhoeven
2025-03-18  7:50     ` Tommaso Merciai
2025-03-18  8:21     ` Pavel Machek
2025-03-17  8:32 ` [PATCH 2/3] clk: renesas: rzv2h: Improve rzv2h_ddiv_set_rate() Tommaso Merciai
2025-04-09 12:04   ` Geert Uytterhoeven
2025-03-17  8:32 ` [PATCH 3/3] clk: renesas: rzv2h: Simplify rzv2h_cpg_assert()/rzv2h_cpg_deassert() Tommaso Merciai
2025-04-10 16:25   ` Geert Uytterhoeven
2025-04-10 16:33     ` Tommaso Merciai [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Z_fyvYse83Fj1IIK@tom-desktop \
    --to=tommaso.merciai.xr@bp.renesas.com \
    --cc=biju.das.jz@bp.renesas.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=geert@linux-m68k.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=magnus.damm@gmail.com \
    --cc=mturquette@baylibre.com \
    --cc=p.zabel@pengutronix.de \
    --cc=pavel@denx.de \
    --cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
    --cc=robh@kernel.org \
    --cc=sboyd@kernel.org \
    --cc=tomm.merciai@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.