All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christian Marangi <ansuelsmth@gmail.com>
To: "Russell King (Oracle)" <linux@armlinux.org.uk>
Cc: Andrew Lunn <andrew@lunn.ch>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Andy Gross <agross@kernel.org>,
	Bjorn Andersson <andersson@kernel.org>,
	Konrad Dybcio <konrad.dybcio@linaro.org>,
	linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
	linux-arm-msm@vger.kernel.org
Subject: Re: [net-next PATCH 13/14] net: phy: qcom: deatch qca83xx PHY driver from at803x
Date: Wed, 29 Nov 2023 12:21:40 +0100	[thread overview]
Message-ID: <65671f5b.050a0220.83136.4ea5@mx.google.com> (raw)
In-Reply-To: <ZWceeQFBSZD1hzSk@shell.armlinux.org.uk>

On Wed, Nov 29, 2023 at 11:20:25AM +0000, Russell King (Oracle) wrote:
> On Wed, Nov 29, 2023 at 11:37:56AM +0100, Christian Marangi wrote:
> > On Wed, Nov 29, 2023 at 09:53:00AM +0000, Russell King (Oracle) wrote:
> > > On Wed, Nov 29, 2023 at 03:12:18AM +0100, Christian Marangi wrote:
> > > > diff --git a/drivers/net/phy/qcom/Makefile b/drivers/net/phy/qcom/Makefile
> > > > index 6a68da8aaa7b..43e4d14df8ea 100644
> > > > --- a/drivers/net/phy/qcom/Makefile
> > > > +++ b/drivers/net/phy/qcom/Makefile
> > > > @@ -1,2 +1,3 @@
> > > >  # SPDX-License-Identifier: GPL-2.0
> > > > -obj-$(CONFIG_AT803X_PHY)	+= at803x.o
> > > > +obj-$(CONFIG_AT803X_PHY)	+= at803x.o common.o
> > > > +obj-$(CONFIG_QCA83XX_PHY)	+= qca83xx.o common.o
> > > 
> > > These PHY drivers can be built as modules. You will end up with several
> > > modules - at803x.ko, qca83xx.ko and common.ko. You don't mark any
> > > functions in common.c as exported, no module license, no author, no
> > > description. common.ko is way too generic a name as well.
> > > 
> > > Please think about this more and test building these drivers as a
> > > module.
> > >
> > 
> > Had some fear about this...
> > 
> > What would be the preferred way for this?
> > 
> > Having a .ko that EXPORT symbol or making the PHY driver .ko to compile
> > the common.o in it?
> 
> I think the former, otherwise we end up with common.o duplicated in
> each module, which becomes unnecessary bloat. This is how the Broadcom
> stuff (which also has a "library") does it.
> 
> > Honestly I would like the second option since I would prefer not to
> > create a .ko with shared function and EXPORT lots of symbols. On SoC it's
> > expected to have only one of the PHY (at max 2 when the qca807x PHY will
> > be implemented, with the at808x also present) so the size increase is
> > minimal.
> > 
> > (just to be more clear, talking about this makefile implementation)
> > 
> > at803x-objs			+= common.o
> > obj-$(CONFIG_AT803X_PHY)	+= at803x.o
> > qca83xx-objs			+= common.o
> > obj-$(CONFIG_QCA83XX_PHY)	+= qca83xx.o
> > qca808x-objs			+= common.o
> > obj-$(CONFIG_QCA808X_PHY)	+= qca808x.o
> 
> That won't work - the -objs needs to list the corresponding .o file
> as well, and it needs to be a different name (you can't do this:
> 
> qca808x-objs			+= common.o qca808x.o
> 
> it has to be something like:
> 
> qca808x-phy-objs		+= common.o qca808x.o
> obj-$(CONFIG_QCA808X_PHY)	+= qca808x-phy.o
> 
> However, I don't like this because it means each module ends up with
> a copy of common.o in it.
> 

Ok will do the .ko library approach np.

> > For name of common.c, is qcom_ethphy_common.c a better name?
> 
> or qcom-phy-lib.c which follows what we have for Broadcom.
>

Think we have to add some reference that it's about ethernet somewhere.

There are already lots of qcom-phy .ko outside net/ 

qcom-ethphy-lib.c ?

-- 
	Ansuel

  reply	other threads:[~2023-11-29 11:24 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-29  2:12 [net-next PATCH 00/14] net: phy: at803x: cleanup + split Christian Marangi
2023-11-29  2:12 ` [net-next PATCH 01/14] net: phy: at803x: fix passing the wrong reference for config_intr Christian Marangi
2023-11-30 14:50   ` Andrew Lunn
2023-11-29  2:12 ` [net-next PATCH 02/14] net: phy: at803x: move disable WOL for 8031 from probe to config Christian Marangi
2023-11-29  9:24   ` Russell King (Oracle)
2023-11-29  9:36     ` Christian Marangi
2023-11-29 10:45       ` Russell King (Oracle)
2023-11-29 11:03         ` Christian Marangi
2023-11-29 11:09           ` Russell King (Oracle)
2023-11-30 14:58   ` Andrew Lunn
2023-11-29  2:12 ` [net-next PATCH 03/14] net: phy: at803x: raname hw_stats functions to qca83xx specific name Christian Marangi
2023-11-30 14:59   ` Andrew Lunn
2023-11-29  2:12 ` [net-next PATCH 04/14] net: phy: at803x: move qca83xx stats out of generic at803x_priv struct Christian Marangi
2023-11-29  9:29   ` Russell King (Oracle)
2023-11-29  9:38     ` Christian Marangi
2023-11-30 15:09   ` Andrew Lunn
2023-11-29  2:12 ` [net-next PATCH 05/14] net: phy: at803x: move qca83xx specific check in dedicated functions Christian Marangi
2023-11-30 15:14   ` Andrew Lunn
2023-11-29  2:12 ` [net-next PATCH 06/14] net: phy: at803x: move at8031 specific data out of generic at803x_priv Christian Marangi
2023-11-29  9:35   ` Russell King (Oracle)
2023-11-29 11:08     ` Christian Marangi
2023-11-29 11:31       ` Russell King (Oracle)
2023-11-30 15:21   ` Andrew Lunn
2023-11-30 19:38     ` Christian Marangi
2023-11-30 20:14       ` Andrew Lunn
2023-11-30 20:24         ` Christian Marangi
2023-11-29  2:12 ` [net-next PATCH 07/14] net: phy: at803x: move at8035 specific DT parse to dedicated probe Christian Marangi
2023-11-30 15:29   ` Andrew Lunn
2023-11-29  2:12 ` [net-next PATCH 08/14] net: phy: at803x: drop specific PHY id check from cable test functions Christian Marangi
2023-11-29  9:38   ` Russell King (Oracle)
2023-11-29  9:47     ` Christian Marangi
2023-11-29 10:57       ` Russell King (Oracle)
2023-11-29 11:04         ` Christian Marangi
2023-11-29 11:07   ` Russell King (Oracle)
2023-11-29  2:12 ` [net-next PATCH 09/14] net: phy: at803x: remove specific qca808x check from at803x functions Christian Marangi
2023-11-29  9:43   ` Russell King (Oracle)
2023-11-29  9:49     ` Christian Marangi
2023-11-29  2:12 ` [net-next PATCH 10/14] net: phy: at803x: drop usless probe for qca8081 PHY Christian Marangi
2023-11-29  9:44   ` Russell King (Oracle)
2023-11-29  9:51     ` Christian Marangi
2023-11-29  2:12 ` [net-next PATCH 11/14] net: phy: at803x: make specific status mask more generic Christian Marangi
2023-11-29  2:12 ` [net-next PATCH 12/14] net: phy: move at803x PHY driver to dedicated directory Christian Marangi
2023-11-29  2:12 ` [net-next PATCH 13/14] net: phy: qcom: deatch qca83xx PHY driver from at803x Christian Marangi
2023-11-29  9:53   ` Russell King (Oracle)
2023-11-29 10:37     ` Christian Marangi
2023-11-29 11:20       ` Russell King (Oracle)
2023-11-29 11:21         ` Christian Marangi [this message]
2023-11-29  2:12 ` [net-next PATCH 14/14] net: phy: qcom: detach qca808x " Christian Marangi

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=65671f5b.050a0220.83136.4ea5@mx.google.com \
    --to=ansuelsmth@gmail.com \
    --cc=agross@kernel.org \
    --cc=andersson@kernel.org \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hkallweit1@gmail.com \
    --cc=konrad.dybcio@linaro.org \
    --cc=kuba@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.