[PATCH net-next] net: dsa: realtek: make interface drivers depend on OF

Alvin Šipraga posted 1 patch 4 years, 3 months ago
drivers/net/dsa/realtek/Kconfig | 2 ++
1 file changed, 2 insertions(+)
[PATCH net-next] net: dsa: realtek: make interface drivers depend on OF
Posted by Alvin Šipraga 4 years, 3 months ago
From: Alvin Šipraga <alsi@bang-olufsen.dk>

The kernel test robot reported build warnings with a randconfig that
built realtek-{smi,mdio} without CONFIG_OF set. Since both interface
drivers are using OF and will not probe without, add the corresponding
dependency to Kconfig.

Link: https://lore.kernel.org/all/202203231233.Xx73Y40o-lkp@intel.com/
Link: https://lore.kernel.org/all/202203231439.ycl0jg50-lkp@intel.com/
Signed-off-by: Alvin Šipraga <alsi@bang-olufsen.dk>
---
 drivers/net/dsa/realtek/Kconfig | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/dsa/realtek/Kconfig b/drivers/net/dsa/realtek/Kconfig
index b7427a8292b2..1aa79735355f 100644
--- a/drivers/net/dsa/realtek/Kconfig
+++ b/drivers/net/dsa/realtek/Kconfig
@@ -12,6 +12,7 @@ menuconfig NET_DSA_REALTEK
 config NET_DSA_REALTEK_MDIO
 	tristate "Realtek MDIO connected switch driver"
 	depends on NET_DSA_REALTEK
+	depends on OF
 	help
 	  Select to enable support for registering switches configured
 	  through MDIO.
@@ -19,6 +20,7 @@ config NET_DSA_REALTEK_MDIO
 config NET_DSA_REALTEK_SMI
 	tristate "Realtek SMI connected switch driver"
 	depends on NET_DSA_REALTEK
+	depends on OF
 	help
 	  Select to enable support for registering switches connected
 	  through SMI.
-- 
2.35.1

Re: [PATCH net-next] net: dsa: realtek: make interface drivers depend on OF
Posted by Andrew Lunn 4 years, 3 months ago
On Wed, Mar 23, 2022 at 01:42:25PM +0100, Alvin Šipraga wrote:
> From: Alvin Šipraga <alsi@bang-olufsen.dk>
> 
> The kernel test robot reported build warnings with a randconfig that
> built realtek-{smi,mdio} without CONFIG_OF set. Since both interface
> drivers are using OF and will not probe without, add the corresponding
> dependency to Kconfig.
> 
> Link: https://lore.kernel.org/all/202203231233.Xx73Y40o-lkp@intel.com/
> Link: https://lore.kernel.org/all/202203231439.ycl0jg50-lkp@intel.com/
> Signed-off-by: Alvin Šipraga <alsi@bang-olufsen.dk>

Hi Alvin

This looks like something which could go into net, not net-next. Could
you add a Fixes: tag.

Otherwise

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew
Re: [PATCH net-next] net: dsa: realtek: make interface drivers depend on OF
Posted by Alvin Šipraga 4 years, 3 months ago
Hi Andrew,

On Wed, Mar 23, 2022 at 01:57:57PM +0100, Andrew Lunn wrote:
> On Wed, Mar 23, 2022 at 01:42:25PM +0100, Alvin Šipraga wrote:
> > From: Alvin Šipraga <alsi@bang-olufsen.dk>
> > 
> > The kernel test robot reported build warnings with a randconfig that
> > built realtek-{smi,mdio} without CONFIG_OF set. Since both interface
> > drivers are using OF and will not probe without, add the corresponding
> > dependency to Kconfig.
> > 
> > Link: https://lore.kernel.org/all/202203231233.Xx73Y40o-lkp@intel.com/
> > Link: https://lore.kernel.org/all/202203231439.ycl0jg50-lkp@intel.com/
> > Signed-off-by: Alvin Šipraga <alsi@bang-olufsen.dk>
> 
> Hi Alvin
> 
> This looks like something which could go into net, not net-next. Could
> you add a Fixes: tag.

The driver has been split in net-next and deviates significantly from
what is in net. I can send a patch to net as well, but that will not
cover net-next.

View from net:

    drivers/net/dsa/Kconfig:
    ...
    config NET_DSA_REALTEK_SMI
    ...

View from net-next:

    drivers/net/dsa/Kconfig:
    ...
    source "drivers/net/dsa/realtek/Kconfig"
    ...

    drivers/net/dsa/realtek/Kconfig:
    menuconfig NET_DSA_REALTEK
        ...
    config NET_DSA_REALTEK_MDIO
        ...
    config NET_DSA_REALTEK_SMI
        ...

I am not well-versed in the procedures here, but since 5.17 has now been
released, isn't it more important to fix 5.18, which will soon have the
net-next branch merged in? Hence the patch should target net-next?

As for 5.17 and the old (net) structure, I can send a separate patch to
net. Does that sound OK?

Once that is clarified I can re-send with a Fixes: tag.

Thanks for your help.

Kind regards,
Alvin


> 
> Otherwise
> 
> Reviewed-by: Andrew Lunn <andrew@lunn.ch>
> 
>     Andrew
Re: [PATCH net-next] net: dsa: realtek: make interface drivers depend on OF
Posted by Jakub Kicinski 4 years, 3 months ago
On Wed, 23 Mar 2022 13:48:56 +0000 Alvin Šipraga wrote:
> The driver has been split in net-next and deviates significantly from
> what is in net. I can send a patch to net as well, but that will not
> cover net-next.
> 
> View from net:
> 
>     drivers/net/dsa/Kconfig:
>     ...
>     config NET_DSA_REALTEK_SMI
>     ...
> 
> View from net-next:
> 
>     drivers/net/dsa/Kconfig:
>     ...
>     source "drivers/net/dsa/realtek/Kconfig"
>     ...
> 
>     drivers/net/dsa/realtek/Kconfig:
>     menuconfig NET_DSA_REALTEK
>         ...
>     config NET_DSA_REALTEK_MDIO
>         ...
>     config NET_DSA_REALTEK_SMI
>         ...
> 
> I am not well-versed in the procedures here, but since 5.17 has now been
> released, isn't it more important to fix 5.18, which will soon have the
> net-next branch merged in? Hence the patch should target net-next?
> 
> As for 5.17 and the old (net) structure, I can send a separate patch to
> net. Does that sound OK?
> 
> Once that is clarified I can re-send with a Fixes: tag.

Just reply with a Fixes tag, I'll sort it out. I'm about to merge 
the trees so it's a little bit of a special situation.
Re: [PATCH net-next] net: dsa: realtek: make interface drivers depend on OF
Posted by Alvin Šipraga 4 years, 3 months ago
On Wed, Mar 23, 2022 at 08:39:53AM -0700, Jakub Kicinski wrote:
> On Wed, 23 Mar 2022 13:48:56 +0000 Alvin Šipraga wrote:
> > The driver has been split in net-next and deviates significantly from
> > what is in net. I can send a patch to net as well, but that will not
> > cover net-next.
> > 
> > View from net:
> > 
> >     drivers/net/dsa/Kconfig:
> >     ...
> >     config NET_DSA_REALTEK_SMI
> >     ...
> > 
> > View from net-next:
> > 
> >     drivers/net/dsa/Kconfig:
> >     ...
> >     source "drivers/net/dsa/realtek/Kconfig"
> >     ...
> > 
> >     drivers/net/dsa/realtek/Kconfig:
> >     menuconfig NET_DSA_REALTEK
> >         ...
> >     config NET_DSA_REALTEK_MDIO
> >         ...
> >     config NET_DSA_REALTEK_SMI
> >         ...
> > 
> > I am not well-versed in the procedures here, but since 5.17 has now been
> > released, isn't it more important to fix 5.18, which will soon have the
> > net-next branch merged in? Hence the patch should target net-next?
> > 
> > As for 5.17 and the old (net) structure, I can send a separate patch to
> > net. Does that sound OK?
> > 
> > Once that is clarified I can re-send with a Fixes: tag.
> 
> Just reply with a Fixes tag, I'll sort it out. I'm about to merge 
> the trees so it's a little bit of a special situation.

Thanks Jakub.

Strictly speaking the Fixes: is this:

Fixes: aac94001067d ("net: dsa: realtek: add new mdio interface for drivers")

But the problem existed before that, just in a form unapplicable to
net-next. See my reply to Andrew...

Kind regards,
Alvin
Re: [PATCH net-next] net: dsa: realtek: make interface drivers depend on OF
Posted by Luiz Angelo Daros de Luca 4 years, 2 months ago
> Fixes: aac94001067d ("net: dsa: realtek: add new mdio interface for drivers")

Thanks Alvin for the fix. Maybe you should add both commits.

Acked-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>

Regards,

Luiz
Re: [PATCH net-next] net: dsa: realtek: make interface drivers depend on OF
Posted by Alvin Šipraga 4 years, 2 months ago
On Thu, Mar 24, 2022 at 07:26:18PM -0300, Luiz Angelo Daros de Luca wrote:
> > Fixes: aac94001067d ("net: dsa: realtek: add new mdio interface for drivers")
> 
> Thanks Alvin for the fix. Maybe you should add both commits.

Woops, you're right. Ought to also carry this tag:

Fixes: 765c39a4fafe ("net: dsa: realtek: convert subdrivers into modules")

Thanks Luiz.

Kind regards,
Alvin

> 
> Acked-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
> 
> Regards,
> 
> Luiz