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] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPv3WKcqpHfN8UnZo19nKPQMbM5hZvptD=mswvuy-8HB6p=BwQ@mail.gmail.com>
Date:   Tue, 21 Jun 2022 11:14:29 +0200
From:   Marcin Wojtas <mw@...ihalf.com>
To:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc:     Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        ACPI Devel Maling List <linux-acpi@...r.kernel.org>,
        netdev <netdev@...r.kernel.org>,
        "Rafael J. Wysocki" <rafael@...nel.org>,
        Len Brown <lenb@...nel.org>, Andrew Lunn <andrew@...n.ch>,
        vivien.didelot@...il.com, Florian Fainelli <f.fainelli@...il.com>,
        Vladimir Oltean <olteanv@...il.com>,
        "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>, pabeni@...hat.com,
        Russell King - ARM Linux <linux@...linux.org.uk>,
        Heiner Kallweit <hkallweit1@...il.com>,
        Grzegorz Bernacki <gjb@...ihalf.com>,
        Grzegorz Jaszczyk <jaz@...ihalf.com>,
        Tomasz Nowicki <tn@...ihalf.com>,
        Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@....com>,
        upstream@...ihalf.com
Subject: Re: [net-next: PATCH 11/12] net: dsa: mv88e6xxx: switch to
 device_/fwnode_ APIs

pon., 20 cze 2022 o 20:03 Andy Shevchenko
<andriy.shevchenko@...ux.intel.com> napisaƂ(a):
>
> On Mon, Jun 20, 2022 at 05:02:24PM +0200, Marcin Wojtas wrote:
> > In order to support both ACPI and DT, modify the generic
> > DSA code to use device_/fwnode_ equivalent routines.
> > No functional change is introduced by this patch.
>
> ...
>
> >       int err;
> >
> > -     if (!np && !pdata)
> > +     if (!fwnode && !pdata)
> >               return -EINVAL;
>
> Sounds like redundant check
>
>         if (pdata)
>                 ...
>         else
>                 compat_info = ...
>         if (!compat_info)
>                 return -EINVAL
>
> ?
>
> > -     if (np)
> > -             compat_info = of_device_get_match_data(dev);
> > +     if (fwnode)
> > +             compat_info = device_get_match_data(dev);
> >
> >       if (pdata) {
>
> Missed 'else' even in the original code (see above)?
>

fwnode/np is mutually exclusive with pdata, but imo nothing wrong with
adding 'else' here or update the condition as suggested above.

Thanks,
Marcin


> >               compat_info = pdata_device_get_match_data(dev);
>
>
> --
> With Best Regards,
> Andy Shevchenko
>
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ