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: <CAPv3WKeJL107p+B2fV2xKj2bvHCa2fx3XCDd3qMoY0uzFVkENA@mail.gmail.com>
Date:   Fri, 15 Jul 2022 21:36:15 +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>,
        Sean Wang <sean.wang@...iatek.com>,
        Landen Chao <Landen.Chao@...iatek.com>,
        Linus Walleij <linus.walleij@...aro.org>,
        Andrew Lunn <andrew@...n.ch>,
        Vivien Didelot <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>,
        Paolo Abeni <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 v2 3/8] net: dsa: switch to device_/fwnode_ APIs

pt., 15 lip 2022 o 21:25 Andy Shevchenko
<andriy.shevchenko@...ux.intel.com> napisaƂ(a):
>
> On Fri, Jul 15, 2022 at 10:50:07AM +0200, Marcin Wojtas wrote:
> > In order to support both ACPI and DT, modify the generic
> > DSA code to use device_/fwnode_ equivalent routines.
> > Drop using port's dn field and use only fwnode - update
> > all dependent drivers.
> > Because support for more generic fwnode is added,
> > replace '_of' suffix with '_fw' in related routines.
> > No functional change is introduced by this patch.
>
> It's a bit too narrow text in the commit message, can you use more width?
>

Ok.

> ...
>
> > -             ret = of_get_phy_mode(dsa_to_port(ds, 5)->dn, &interface);
> > +             ret = of_get_phy_mode(to_of_node(dsa_to_port(ds, 5)->fwnode), &interface);
>
> So, I believe this is expected to be a temporary change and something like
> fwnode_get_phy_mode() is on its way, correct?
>

I use fwnode_get_phy_mode even if this patch. I can do the conversion
here in v3.

> ...
>
> > -                     phy_handle = of_parse_phandle(dp->dn, "phy-handle", 0);
> > +                     phy_handle = of_parse_phandle(to_of_node(dp->fwnode), "phy-handle", 0);
>
> This can be translated to fwnode_find_reference(), but it might require more
> changes.

Yes.

>
> Actually you may start from converting drivers one-by-one to fwnode
> APIs (as much as it's possible), and then do with a library call. Up to you.
>

I'm dropping the dn and will try to keep the diff in the other drivers
minimal (however, for 2 above cases I will consider of_ -> fwnode_
replacements). Except for mv88e6xxx, I can do only compile-check.

Best regards,
Marcin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ