From: Randy Dunlap <hidden> Date: 2021-05-18 16:33:12
On 5/18/21 2:27 AM, Stephen Rothwell wrote:
Hi all,
Changes since 20210514:
on x86_64:
# CONFIG_OF is not set
../drivers/net/dsa/qca8k.c: In function ‘qca8k_mdio_register’:
../drivers/net/dsa/qca8k.c:797:9: error: implicit declaration of function ‘devm_of_mdiobus_register’; did you mean ‘devm_mdiobus_register’? [-Werror=implicit-function-declaration]
return devm_of_mdiobus_register(priv->dev, bus, mdio);
Should there be a stub for this function in <linux/of_mdio.h>?
or the driver could add a dependency on OF_MDIO.
Full randconfig file is attached.
--
~Randy
Reported-by: Randy Dunlap <redacted>
From: Vladimir Oltean <olteanv@gmail.com> Date: 2021-05-18 16:44:01
Hi Randy,
On Tue, May 18, 2021 at 09:32:49AM -0700, Randy Dunlap wrote:
On 5/18/21 2:27 AM, Stephen Rothwell wrote:
quoted
Hi all,
Changes since 20210514:
on x86_64:
# CONFIG_OF is not set
../drivers/net/dsa/qca8k.c: In function ‘qca8k_mdio_register’:
../drivers/net/dsa/qca8k.c:797:9: error: implicit declaration of function ‘devm_of_mdiobus_register’; did you mean ‘devm_mdiobus_register’? [-Werror=implicit-function-declaration]
return devm_of_mdiobus_register(priv->dev, bus, mdio);
Should there be a stub for this function in <linux/of_mdio.h>?
or the driver could add a dependency on OF_MDIO.
Full randconfig file is attached.
--
~Randy
Reported-by: Randy Dunlap <redacted>
Would something like this work?
-----------------------------[ cut here ]-----------------------------
From 36c0b3f04ebfa51e52bd1bc2dc447d12d1c6e119 Mon Sep 17 00:00:00 2001
From: Vladimir Oltean <olteanv@gmail.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 <redacted>
Signed-off-by: Vladimir Oltean <olteanv@gmail.com>
---
include/linux/of_mdio.h | 7 +++++++
1 file changed, 7 insertions(+)
From: Randy Dunlap <hidden> Date: 2021-05-18 16:57:31
On 5/18/21 9:43 AM, Vladimir Oltean wrote:
quoted hunk
Hi Randy,
Would something like this work?
-----------------------------[ cut here ]-----------------------------
From 36c0b3f04ebfa51e52bd1bc2dc447d12d1c6e119 Mon Sep 17 00:00:00 2001
From: Vladimir Oltean <olteanv@gmail.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 <redacted>
Signed-off-by: Vladimir Oltean <olteanv@gmail.com>
---
include/linux/of_mdio.h | 7 +++++++
1 file changed, 7 insertions(+)
From: Vladimir Oltean <olteanv@gmail.com> Date: 2021-05-18 17:02:31
On Tue, May 18, 2021 at 09:57:13AM -0700, Randy Dunlap wrote:
On 5/18/21 9:43 AM, Vladimir Oltean wrote:
quoted
Hi Randy,
Would something like this work?
-----------------------------[ cut here ]-----------------------------
From 36c0b3f04ebfa51e52bd1bc2dc447d12d1c6e119 Mon Sep 17 00:00:00 2001
From: Vladimir Oltean <olteanv@gmail.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 <redacted>
Signed-off-by: Vladimir Oltean <olteanv@gmail.com>
---
include/linux/of_mdio.h | 7 +++++++
1 file changed, 7 insertions(+)
From: Andrew Lunn <andrew@lunn.ch> Date: 2021-05-18 17:33:34
Would something like this work?
-----------------------------[ cut here ]-----------------------------
quoted
From 36c0b3f04ebfa51e52bd1bc2dc447d12d1c6e119 Mon Sep 17 00:00:00 2001
From: Vladimir Oltean <olteanv@gmail.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 <redacted>
Signed-off-by: Vladimir Oltean <olteanv@gmail.com>
This should be O.K.
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Thanks
Andrew
From: John Crispin <john@phrozen.org> Date: 2021-05-18 18:53:17
On 18.05.21 19:33, Andrew Lunn wrote:
quoted
Would something like this work?
-----------------------------[ cut here ]-----------------------------
quoted
From 36c0b3f04ebfa51e52bd1bc2dc447d12d1c6e119 Mon Sep 17 00:00:00 2001
From: Vladimir Oltean <olteanv@gmail.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 <redacted>
Signed-off-by: Vladimir Oltean <olteanv@gmail.com>
This should be O.K.
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Thanks
Andrew
Just did a x86 build with the patch applied and it completed ...
Acked-by: John Crispin <john@phrozen.org>