netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: jbe@pengutronix.de
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	f.fainelli@gmail.com, kernel@pengutronix.de, andrew@lunn.ch,
	vivien.didelot@savoirfairelinux.com
Subject: Re: [PATCHv5] net: dsa: add SMSC/Microchip LAN9303 three port ethernet switch driver
Date: Thu, 13 Apr 2017 10:46:04 -0400 (EDT)	[thread overview]
Message-ID: <20170413.104604.168979376298793906.davem@davemloft.net> (raw)
In-Reply-To: <20170413073343.8067-1-jbe@pengutronix.de>

From: Juergen Borleis <jbe@pengutronix.de>
Date: Thu, 13 Apr 2017 09:33:39 +0200

> Changes in v5:
> 
> - missing include file to 'net/dsa/tag_lan9303.c' added

This still doesn't build cleanly.

drivers/net/dsa/lan9303_mdio.o: In function `mdio_module_init':
lan9303_mdio.c:(.init.text+0x0): multiple definition of `init_module'
drivers/net/dsa/lan9303_i2c.o:lan9303_i2c.c:(.init.text+0x0): first defined here
drivers/net/dsa/lan9303_mdio.o: In function `mdio_module_exit':
lan9303_mdio.c:(.exit.text+0x0): multiple definition of `cleanup_module'
drivers/net/dsa/lan9303_i2c.o:lan9303_i2c.c:(.exit.text+0x0): first defined here
scripts/Makefile.build:540: recipe for target 'drivers/net/dsa/lan9303.o' failed

Please test with NET_DSA_SMSC_LAN9303=m, NET_DSA_SMSC_LAN9303_I2C=y and
NET_DSA_SMSC_LAN9303_MDIO=y as that is what I used to reproduce the
problem above.

You cannot really use module_i2c_driver() and mdio_module_driver()
at the same time in the same driver module.

You're going to have to have a common module init function which you
code up by hand, which conditionally handles I2C and MDIO based
probing based upon Kconfig symbol settings.

And please more sufficiently test your builds.

Thank you.

  parent reply	other threads:[~2017-04-13 14:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-13  7:33 [PATCHv5] net: dsa: add SMSC/Microchip LAN9303 three port ethernet switch driver Juergen Borleis
2017-04-13  7:33 ` [PATCH v5 1/4] net: dsa: add support for the SMSC-LAN9303 tagging format Juergen Borleis
2017-04-13  7:33 ` [PATCH v5 2/4] net: dsa: add new DSA switch driver for the SMSC-LAN9303 Juergen Borleis
     [not found] ` <20170413073343.8067-1-jbe-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2017-04-13  7:33   ` [PATCH v5 3/4] net: dsa: LAN9303: add I2C managed mode support Juergen Borleis
2017-04-13  7:33   ` [PATCH v5 4/4] net: dsa: LAN9303: add MDIO " Juergen Borleis
2017-04-13 14:46 ` David Miller [this message]
2017-04-18  9:10   ` [PATCHv5] net: dsa: add SMSC/Microchip LAN9303 three port ethernet switch driver Juergen Borleis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170413.104604.168979376298793906.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=andrew@lunn.ch \
    --cc=f.fainelli@gmail.com \
    --cc=jbe@pengutronix.de \
    --cc=kernel@pengutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=vivien.didelot@savoirfairelinux.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).