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:   Mon, 20 Jun 2022 20:46:32 +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, lenb@...nel.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 05/12] net: core: switch to
 fwnode_find_net_device_by_node()

On Mon, Jun 20, 2022 at 05:02:18PM +0200, Marcin Wojtas wrote:
> A helper function which allows getting the struct net_device pointer
> associated with a given device tree node can be more generic and
> also support alternative hardware description. Switch to fwnode_
> and update the only existing caller in DSA subsystem.

...

> +static int fwnode_dev_node_match(struct device *dev, const void *data)
>  {
>  	for (; dev; dev = dev->parent) {
> -		if (dev->of_node == data)

> +		if (dev->fwnode == data)


We have a helper in device/bus.h (?) device_match_fwnode().

>  			return 1;
>  	}

But this all sounds like a good candidate to be generic. Do we have more users
in the kernel of a such?

-- 
With Best Regards,
Andy Shevchenko


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ