linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Viresh Kumar <viresh.kumar@linaro.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>,
	Nicholas Piggin <npiggin@gmail.com>,
	Christophe Leroy <christophe.leroy@csgroup.eu>,
	linux-pm@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] cpufreq: pmac32: Use of_property_read_reg() to parse "reg"
Date: Wed, 23 Aug 2023 14:07:04 -0500	[thread overview]
Message-ID: <CAL_JsqLQCSHfQtYicBVYfjtcE2nJLZ=g_7ASj5LfBhOb2Y2ouw@mail.gmail.com> (raw)
In-Reply-To: <20230703030148.qqszljkgnyzt52da@vireshk-i7>

On Sun, Jul 2, 2023 at 10:01 PM Viresh Kumar <viresh.kumar@linaro.org> wrote:
>
> On 09-06-23, 12:31, Rob Herring wrote:
> > Use the recently added of_property_read_reg() helper to get the
> > untranslated "reg" address value.
> >
> > Signed-off-by: Rob Herring <robh@kernel.org>
> > ---
> >  drivers/cpufreq/pmac32-cpufreq.c | 5 ++---
> >  1 file changed, 2 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/cpufreq/pmac32-cpufreq.c b/drivers/cpufreq/pmac32-cpufreq.c
> > index ec75e79659ac..f53635ba16c1 100644
> > --- a/drivers/cpufreq/pmac32-cpufreq.c
> > +++ b/drivers/cpufreq/pmac32-cpufreq.c
> > @@ -378,10 +378,9 @@ static int pmac_cpufreq_cpu_init(struct cpufreq_policy *policy)
> >
> >  static u32 read_gpio(struct device_node *np)
> >  {
> > -     const u32 *reg = of_get_property(np, "reg", NULL);
> > -     u32 offset;
> > +     u64 offset;
> >
> > -     if (reg == NULL)
> > +     if (of_property_read_reg(np, 0, &offset, NULL) < 0)
> >               return 0;
> >       /* That works for all keylargos but shall be fixed properly
> >        * some day... The problem is that it seems we can't rely
>
> Acked-by: Viresh Kumar <viresh.kumar@linaro.org>

Is someone going to apply this?

Rob

      reply	other threads:[~2023-08-23 19:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-09 18:31 [PATCH] cpufreq: pmac32: Use of_property_read_reg() to parse "reg" Rob Herring
2023-06-30 21:02 ` Rob Herring
2023-07-03  3:01 ` Viresh Kumar
2023-08-23 19:07   ` Rob Herring [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='CAL_JsqLQCSHfQtYicBVYfjtcE2nJLZ=g_7ASj5LfBhOb2Y2ouw@mail.gmail.com' \
    --to=robh@kernel.org \
    --cc=christophe.leroy@csgroup.eu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=npiggin@gmail.com \
    --cc=rafael@kernel.org \
    --cc=viresh.kumar@linaro.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).