linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] drivers: net: dsa: fix warning same module names
@ 2019-06-12  8:11 Anders Roxell
  2019-06-12 12:36 ` Linus Walleij
  0 siblings, 1 reply; 4+ messages in thread
From: Anders Roxell @ 2019-06-12  8:11 UTC (permalink / raw)
  To: davem
  Cc: andrew, vivien.didelot, f.fainelli, linus.walleij, netdev,
	linux-kernel, Anders Roxell

When building with CONFIG_NET_DSA_REALTEK_SMI and CONFIG_REALTEK_PHY
enabled as loadable modules, we see the following warning:

warning: same module names found:
  drivers/net/phy/realtek.ko
  drivers/net/dsa/realtek.ko

Rework so the driver name is rtl8366 instead of realtek.

Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
---
 drivers/net/dsa/Makefile                        | 4 ++--
 drivers/net/dsa/{rtl8366.c => rtl8366-common.c} | 0
 2 files changed, 2 insertions(+), 2 deletions(-)
 rename drivers/net/dsa/{rtl8366.c => rtl8366-common.c} (100%)

diff --git a/drivers/net/dsa/Makefile b/drivers/net/dsa/Makefile
index fefb6aaa82ba..d7a282eb2ff9 100644
--- a/drivers/net/dsa/Makefile
+++ b/drivers/net/dsa/Makefile
@@ -9,8 +9,8 @@ obj-$(CONFIG_NET_DSA_LANTIQ_GSWIP) += lantiq_gswip.o
 obj-$(CONFIG_NET_DSA_MT7530)	+= mt7530.o
 obj-$(CONFIG_NET_DSA_MV88E6060) += mv88e6060.o
 obj-$(CONFIG_NET_DSA_QCA8K)	+= qca8k.o
-obj-$(CONFIG_NET_DSA_REALTEK_SMI) += realtek.o
-realtek-objs			:= realtek-smi.o rtl8366.o rtl8366rb.o
+obj-$(CONFIG_NET_DSA_REALTEK_SMI) += rtl8366.o
+rtl8366-objs			:= realtek-smi.o rtl8366-common.o rtl8366rb.o
 obj-$(CONFIG_NET_DSA_SMSC_LAN9303) += lan9303-core.o
 obj-$(CONFIG_NET_DSA_SMSC_LAN9303_I2C) += lan9303_i2c.o
 obj-$(CONFIG_NET_DSA_SMSC_LAN9303_MDIO) += lan9303_mdio.o
diff --git a/drivers/net/dsa/rtl8366.c b/drivers/net/dsa/rtl8366-common.c
similarity index 100%
rename from drivers/net/dsa/rtl8366.c
rename to drivers/net/dsa/rtl8366-common.c
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] drivers: net: dsa: fix warning same module names
  2019-06-12  8:11 [PATCH v2] drivers: net: dsa: fix warning same module names Anders Roxell
@ 2019-06-12 12:36 ` Linus Walleij
  2019-06-12 13:16   ` Andrew Lunn
  0 siblings, 1 reply; 4+ messages in thread
From: Linus Walleij @ 2019-06-12 12:36 UTC (permalink / raw)
  To: Anders Roxell
  Cc: David S. Miller, Andrew Lunn, Vivien Didelot, Florian Fainelli,
	netdev, linux-kernel

On Wed, Jun 12, 2019 at 10:11 AM Anders Roxell <anders.roxell@linaro.org> wrote:

> When building with CONFIG_NET_DSA_REALTEK_SMI and CONFIG_REALTEK_PHY
> enabled as loadable modules, we see the following warning:
>
> warning: same module names found:
>   drivers/net/phy/realtek.ko
>   drivers/net/dsa/realtek.ko
>
> Rework so the driver name is rtl8366 instead of realtek.
>
> Signed-off-by: Anders Roxell <anders.roxell@linaro.org>

Sorry for giving bad advice here on IRC... my wrong.

> -obj-$(CONFIG_NET_DSA_REALTEK_SMI) += realtek.o
> -realtek-objs                   := realtek-smi.o rtl8366.o rtl8366rb.o
> +obj-$(CONFIG_NET_DSA_REALTEK_SMI) += rtl8366.o
> +rtl8366-objs                   := realtek-smi.o rtl8366-common.o rtl8366rb.o

What is common for this family is not the name rtl8366
(there is for example rtl8369 in this family, we just haven't
added it yet) but the common technical item is SMI.

So I would suggest something like:

obj-$(CONFIG_NET_DSA_REALTEK_SMI) += realtek-smi.o
realtek-smi-objs := realtek-smi-core.o rtl8366.o rtl8366rb.o

I.e. rename the realtel-smi.c to realtek-smi-core.c instead
and go with that.

With that change:
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] drivers: net: dsa: fix warning same module names
  2019-06-12 12:36 ` Linus Walleij
@ 2019-06-12 13:16   ` Andrew Lunn
  2019-06-12 18:39     ` Linus Walleij
  0 siblings, 1 reply; 4+ messages in thread
From: Andrew Lunn @ 2019-06-12 13:16 UTC (permalink / raw)
  To: Linus Walleij
  Cc: Anders Roxell, David S. Miller, Vivien Didelot, Florian Fainelli,
	netdev, linux-kernel

On Wed, Jun 12, 2019 at 02:36:44PM +0200, Linus Walleij wrote:
> On Wed, Jun 12, 2019 at 10:11 AM Anders Roxell <anders.roxell@linaro.org> wrote:
> 
> > When building with CONFIG_NET_DSA_REALTEK_SMI and CONFIG_REALTEK_PHY
> > enabled as loadable modules, we see the following warning:
> >
> > warning: same module names found:
> >   drivers/net/phy/realtek.ko
> >   drivers/net/dsa/realtek.ko
> >
> > Rework so the driver name is rtl8366 instead of realtek.
> >
> > Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
> 
> Sorry for giving bad advice here on IRC... my wrong.
> 
> > -obj-$(CONFIG_NET_DSA_REALTEK_SMI) += realtek.o
> > -realtek-objs                   := realtek-smi.o rtl8366.o rtl8366rb.o
> > +obj-$(CONFIG_NET_DSA_REALTEK_SMI) += rtl8366.o
> > +rtl8366-objs                   := realtek-smi.o rtl8366-common.o rtl8366rb.o
> 
> What is common for this family is not the name rtl8366
> (there is for example rtl8369 in this family, we just haven't
> added it yet) but the common technical item is SMI.

Hi Linus

I was not sure about this. I thought SMI was the bus used to
communicate with the switch. It just seemed odd to call a switch
family after the bus.

Anyway, if you are happy with the name realtek-smi: 

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

    Andrew

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] drivers: net: dsa: fix warning same module names
  2019-06-12 13:16   ` Andrew Lunn
@ 2019-06-12 18:39     ` Linus Walleij
  0 siblings, 0 replies; 4+ messages in thread
From: Linus Walleij @ 2019-06-12 18:39 UTC (permalink / raw)
  To: Andrew Lunn
  Cc: Anders Roxell, David S. Miller, Vivien Didelot, Florian Fainelli,
	netdev, linux-kernel

On Wed, Jun 12, 2019 at 3:16 PM Andrew Lunn <andrew@lunn.ch> wrote:
> On Wed, Jun 12, 2019 at 02:36:44PM +0200, Linus Walleij wrote:

> > Sorry for giving bad advice here on IRC... my wrong.
> >
> > > -obj-$(CONFIG_NET_DSA_REALTEK_SMI) += realtek.o
> > > -realtek-objs                   := realtek-smi.o rtl8366.o rtl8366rb.o
> > > +obj-$(CONFIG_NET_DSA_REALTEK_SMI) += rtl8366.o
> > > +rtl8366-objs                   := realtek-smi.o rtl8366-common.o rtl8366rb.o
> >
> > What is common for this family is not the name rtl8366
> > (there is for example rtl8369 in this family, we just haven't
> > added it yet) but the common technical item is SMI.
>
> Hi Linus
>
> I was not sure about this. I thought SMI was the bus used to
> communicate with the switch. It just seemed odd to call a switch
> family after the bus.

It is true, but as can be seen from:
Documentation/devicetree/bindings/net/dsa/realtek-smi.txt
it is a family of 8 switches. I think we should just have
one module handling all of them for simplicity, once we
get around to implementing anything else than RTL8366RB
that is.

It's these 8 switches that talk SMI and they have a lot
in common like talking RRCP internally AFAICT.
I think these switches are pretty complex on the inside,
we just don't have very good documentation :/

> Anyway, if you are happy with the name realtek-smi:
>
> Reviewed-by: Andrew Lunn <andrew@lunn.ch>

Thanks!

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-06-12 18:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-12  8:11 [PATCH v2] drivers: net: dsa: fix warning same module names Anders Roxell
2019-06-12 12:36 ` Linus Walleij
2019-06-12 13:16   ` Andrew Lunn
2019-06-12 18:39     ` Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).