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]
Date:   Fri, 15 Jul 2022 22:25:40 +0300
From:   Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To:     Marcin Wojtas <mw@...ihalf.com>
Cc:     linux-kernel@...r.kernel.org, linux-acpi@...r.kernel.org,
        netdev@...r.kernel.org, rafael@...nel.org, sean.wang@...iatek.com,
        Landen.Chao@...iatek.com, linus.walleij@...aro.org, andrew@...n.ch,
        vivien.didelot@...il.com, f.fainelli@...il.com, olteanv@...il.com,
        davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
        pabeni@...hat.com, linux@...linux.org.uk, hkallweit1@...il.com,
        gjb@...ihalf.com, jaz@...ihalf.com, tn@...ihalf.com,
        Samer.El-Haj-Mahmoud@....com, upstream@...ihalf.com
Subject: Re: [net-next: PATCH v2 3/8] net: dsa: switch to device_/fwnode_ APIs

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?

...

> -		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?

...

> -			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.

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.

-- 
With Best Regards,
Andy Shevchenko


Powered by blists - more mailing lists