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:   Tue, 18 May 2021 09:57:13 -0700
From:   Randy Dunlap <rdunlap@...radead.org>
To:     Vladimir Oltean <olteanv@...il.com>
Cc:     Stephen Rothwell <sfr@...b.auug.org.au>,
        Linux Next Mailing List <linux-next@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        John Crispin <john@...ozen.org>,
        Ansuel Smith <ansuelsmth@...il.com>,
        Andrew Lunn <andrew@...n.ch>,
        Vivien Didelot <vivien.didelot@...il.com>,
        Florian Fainelli <f.fainelli@...il.com>
Subject: Re: linux-next: Tree for May 18 (drivers/net/dsa/qca8k.c)

On 5/18/21 9:43 AM, Vladimir Oltean wrote:
> Hi Randy,
> 
> Would something like this work?
> 
> -----------------------------[ cut here ]-----------------------------
> From 36c0b3f04ebfa51e52bd1bc2dc447d12d1c6e119 Mon Sep 17 00:00:00 2001
> From: Vladimir Oltean <olteanv@...il.com>
> Date: Tue, 18 May 2021 19:39:18 +0300
> Subject: [PATCH] net: mdio: provide shim implementation of
>  devm_of_mdiobus_register
> 
> Similar to the way in which of_mdiobus_register() has a fallback to the
> non-DT based mdiobus_register() when CONFIG_OF is not set, we can create
> a shim for the device-managed devm_of_mdiobus_register() which calls
> devm_mdiobus_register() and discards the struct device_node *.
> 
> In particular, this solves a build issue with the qca8k DSA driver which
> uses devm_of_mdiobus_register and can be compiled without CONFIG_OF.
> 
> Reported-by: Randy Dunlap <rdunlap@...radead.org>
> Signed-off-by: Vladimir Oltean <olteanv@...il.com>
> ---
>  include/linux/of_mdio.h | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/include/linux/of_mdio.h b/include/linux/of_mdio.h
> index 2b05e7f7c238..da633d34ab86 100644
> --- a/include/linux/of_mdio.h
> +++ b/include/linux/of_mdio.h
> @@ -72,6 +72,13 @@ static inline int of_mdiobus_register(struct mii_bus *mdio, struct device_node *
>  	return mdiobus_register(mdio);
>  }
>  
> +static inline int devm_of_mdiobus_register(struct device *dev,
> +					   struct mii_bus *mdio,
> +					   struct device_node *np)
> +{
> +	return devm_mdiobus_register(dev, mdio);
> +}
> +
>  static inline struct mdio_device *of_mdio_find_device(struct device_node *np)
>  {
>  	return NULL;
> -----------------------------[ cut here ]-----------------------------
> 

Yes, that's all good. Thanks.

Acked-by: Randy Dunlap <rdunlap@...radead.org> # build-tested

-- 
~Randy

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ