lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAL_JsqLQCSHfQtYicBVYfjtcE2nJLZ=g_7ASj5LfBhOb2Y2ouw@mail.gmail.com>
Date:   Wed, 23 Aug 2023 14:07:04 -0500
From:   Rob Herring <robh@...nel.org>
To:     Viresh Kumar <viresh.kumar@...aro.org>,
        "Rafael J. Wysocki" <rafael@...nel.org>
Cc:     Michael Ellerman <mpe@...erman.id.au>,
        Nicholas Piggin <npiggin@...il.com>,
        Christophe Leroy <christophe.leroy@...roup.eu>,
        linux-pm@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] cpufreq: pmac32: Use of_property_read_reg() to parse "reg"

On Sun, Jul 2, 2023 at 10:01 PM Viresh Kumar <viresh.kumar@...aro.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@...nel.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@...aro.org>

Is someone going to apply this?

Rob

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ