[EXTERNAL] [PATCH net-next v3] net: ti: icssg-prueth: Split out common object into module
Sai Krishna Gajula
saikrishnag at marvell.com
Sun Jul 14 23:02:27 PDT 2024
> -----Original Message-----
> From: Andrew Lunn <andrew at lunn.ch>
> Sent: Saturday, July 13, 2024 8:15 PM
> To: Sai Krishna Gajula <saikrishnag at marvell.com>
> Cc: MD Danish Anwar <danishanwar at ti.com>; Heiner Kallweit
> <hkallweit1 at gmail.com>; Simon Horman <horms at kernel.org>; Dan
> Carpenter <dan.carpenter at linaro.org>; Jan Kiszka
> <jan.kiszka at siemens.com>; Wolfram Sang <wsa+renesas at sang-
> engineering.com>; Diogo Ivo <diogo.ivo at siemens.com>; Roger Quadros
> <rogerq at kernel.org>; Paolo Abeni <pabeni at redhat.com>; Jakub Kicinski
> <kuba at kernel.org>; Eric Dumazet <edumazet at google.com>; David S. Miller
> <davem at davemloft.net>; linux-arm-kernel at lists.infradead.org; linux-
> kernel at vger.kernel.org; netdev at vger.kernel.org; srk at ti.com; Vignesh
> Raghavendra <vigneshr at ti.com>; Thorsten Leemhuis <linux at leemhuis.info>
> Subject: Re: [EXTERNAL] [PATCH net-next v3] net: ti: icssg-prueth: Split out
> common object into module
>
> On Sat, Jul 13, 2024 at 08: 33: 42AM +0000, Sai Krishna Gajula wrote: > > -----
> Original Message----- > > From: MD Danish Anwar <danishanwar@ ti. com> >
> > Sent: Friday, July 12, 2024 5: 37 PM > > To: Heiner Kallweit
>
> On Sat, Jul 13, 2024 at 08:33:42AM +0000, Sai Krishna Gajula wrote:
> > > -----Original Message-----
> > > From: MD Danish Anwar <danishanwar at ti.com>
> > > Sent: Friday, July 12, 2024 5:37 PM
> > > To: Heiner Kallweit <hkallweit1 at gmail.com>; Simon Horman
> > > <horms at kernel.org>; Dan Carpenter <dan.carpenter at linaro.org>; Jan
> > > Kiszka <jan.kiszka at siemens.com>; Wolfram Sang <wsa+renesas at sang-
> > > engineering.com>; Diogo Ivo <diogo.ivo at siemens.com>; Andrew Lunn
> > > <andrew at lunn.ch>; Roger Quadros <rogerq at kernel.org>; MD Danish
> Anwar
> > > <danishanwar at ti.com>; Paolo Abeni <pabeni at redhat.com>; Jakub
> > > Kicinski <kuba at kernel.org>; Eric Dumazet <edumazet at google.com>;
> > > David S. Miller <davem at davemloft.net>
> > > Cc: linux-arm-kernel at lists.infradead.org;
> > > linux-kernel at vger.kernel.org; netdev at vger.kernel.org; srk at ti.com;
> > > Vignesh Raghavendra <vigneshr at ti.com>; Thorsten Leemhuis
> > > <linux at leemhuis.info>
> > > Subject: [EXTERNAL] [PATCH net-next v3] net: ti: icssg-prueth: Split
> > > out common object into module
> > >
> > > icssg_prueth. c and icssg_prueth_sr1. c drivers use multiple common .c
> files.
> > > These common objects are getting added to multiple modules. As a
> > > result when both drivers are enabled in .config, below warning is seen.
> > > drivers/net/ethernet/ti/Makefile:
> > > icssg_prueth.c and icssg_prueth_sr1.c drivers use multiple common .c
> files.
> > > These common objects are getting added to multiple modules. As a
> > > result when both drivers are enabled in .config, below warning is seen.
> > >
> > > drivers/net/ethernet/ti/Makefile: icssg/icssg_common.o is added to
> > > multiple
> > > modules: icssg-prueth icssg-prueth-sr1
> > > drivers/net/ethernet/ti/Makefile: icssg/icssg_classifier.o is added
> > > to multiple
> > > modules: icssg-prueth icssg-prueth-sr1
> > > drivers/net/ethernet/ti/Makefile: icssg/icssg_config.o is added to
> > > multiple
> > > modules: icssg-prueth icssg-prueth-sr1
> > > drivers/net/ethernet/ti/Makefile: icssg/icssg_mii_cfg.o is added to
> > > multiple
> > > modules: icssg-prueth icssg-prueth-sr1
> > > drivers/net/ethernet/ti/Makefile: icssg/icssg_stats.o is added to
> > > multiple
> > > modules: icssg-prueth icssg-prueth-sr1
> > > drivers/net/ethernet/ti/Makefile: icssg/icssg_ethtool.o is added to
> > > multiple
> > > modules: icssg-prueth icssg-prueth-sr1
> > >
> > > Fix this by building a new module (icssg.o) for all the common objects.
> > > Both the driver can then depend on this common module.
> > >
> > > Some APIs being exported have emac_ as the prefix which may result
> > > into confusion with other existing APIs with emac_ prefix, to avoid
> > > confusion, rename the APIs being exported with emac_ to icssg_ prefix.
> > >
> > > This also fixes below error seen when both drivers are built.
> > > ERROR: modpost: "icssg_queue_pop"
> > > [drivers/net/ethernet/ti/icssg-prueth-sr1.ko] undefined!
> > > ERROR: modpost: "icssg_queue_push"
> > > [drivers/net/ethernet/ti/icssg-prueth-sr1.ko] undefined!
> > >
> > > Reported-and-tested-by: Thorsten Leemhuis <linux at leemhuis.info>
> > > Closes: https://urldefense.proofpoint.com/v2/url?u=https-
> > <https://urldefense.proofpoint.com/v2/url?u=https- >> >
> > 3A__lore.kernel.org_oe-2Dkbuild-2Dall_202405182038.ncf1mL7Z-2Dlkp-
> > > 40intel.com_&d=DwIDAg&c=nKjWec2b6R0mOyPaz7xtfQ&r=c3MsgrR-U-
> > > HFhmFd6R4MWRZG-8QeikJn5PkjqMTpBSg&m=nS910f-bVPllINeciu3zcX-
> > > RmmuaN-hU--Y3YDvgknBD5A8sRk6hE3pZSocV-
> > > 37f&s=sIjxhBrYXEW3mtC1p8o5MaV-xpJ3n16Ct0mRhE52PCQ&e=
> > > Fixes: 487f7323f39a ("net: ti: icssg-prueth: Add helper functions to
> > > configure
> > > FDB")
> > > Reviewed-by: Roger Quadros <rogerq at kernel.org>
> > > Signed-off-by: MD Danish Anwar <danishanwar at ti.com>
> > > ---
> > > Cc: Thorsten Leemhuis <linux at leemhuis.info>
>
> > > base-commit: 2146b7dd354c2a1384381ca3cd5751bfff6137d6
> > > --
> > > 2.34.1
> > >
> > Reviewed-by: Sai Krishna <saikrishnag at marvell.com>
>
> Please trim emails when replying.
>
> If you look what everybody else does with tags like this, they place it directly
> after the Signed-off-by: and delete the actual patch.
Sure Andrew, thanks for the suggestion.
>
> Andrew
More information about the linux-arm-kernel
mailing list