From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Serge Semin <fancer.lancer@gmail.com>
Cc: Jose Abreu <Jose.Abreu@synopsys.com>,
Alexandre Torgue <alexandre.torgue@foss.st.com>,
Alexei Starovoitov <ast@kernel.org>,
"bpf@vger.kernel.org" <bpf@vger.kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
"David S. Miller" <davem@davemloft.net>,
Emil Renner Berthing <kernel@esmil.dk>,
Eric Dumazet <edumazet@google.com>,
Fabio Estevam <festevam@gmail.com>,
Jakub Kicinski <kuba@kernel.org>,
Jesper Dangaard Brouer <hawk@kernel.org>,
John Fastabend <john.fastabend@gmail.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linux-stm32@st-md-mailman.stormreply.com"
<linux-stm32@st-md-mailman.stormreply.com>,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
NXP Linux Team <linux-imx@nxp.com>,
Paolo Abeni <pabeni@redhat.com>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
Samin Guo <samin.guo@starfivetech.com>,
Sascha Hauer <s.hauer@pengutronix.de>,
Shawn Guo <shawnguo@kernel.org>
Subject: Re: [PATCH net-next 1/6] net: stmmac: add platform library
Date: Thu, 14 Sep 2023 11:48:10 +0100 [thread overview]
Message-ID: <ZQLk6kvggzlDUyS2@shell.armlinux.org.uk> (raw)
In-Reply-To: <a2nsiguc6d64twnlbi3qlnsb35e3dyeahf366wora7rjwkl6cm@tnpgman6y23d>
On Thu, Sep 14, 2023 at 01:42:19PM +0300, Serge Semin wrote:
> On Wed, Sep 13, 2023 at 03:21:10PM +0100, Russell King (Oracle) wrote:
> > On Wed, Sep 13, 2023 at 03:14:47PM +0100, Russell King (Oracle) wrote:
> > > On Wed, Sep 13, 2023 at 03:56:07AM +0300, Serge Semin wrote:
> > > > On Tue, Sep 12, 2023 at 06:08:23PM +0100, Russell King (Oracle) wrote:
> > > > > On Tue, Sep 12, 2023 at 12:32:40PM +0300, Serge Semin wrote:
> > > > > > On Tue, Sep 12, 2023 at 07:59:49AM +0000, Jose Abreu wrote:
> > > > > > > From: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
> > > > > > > Date: Mon, Sep 11, 2023 at 16:28:40
> > > > > > >
> > > > > > > > Add a platform library of helper functions for common traits in the
> > > > > > > > platform drivers. Currently, this is setting the tx clock.
> > > > > > > >
> > > > > > > > Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
> > > > > > > > ---
> > > > > >
> > > > > > > > drivers/net/ethernet/stmicro/stmmac/Makefile | 2 +-
> > > > > > > > .../ethernet/stmicro/stmmac/stmmac_plat_lib.c | 29 +++++++++++++++++++
> > > > > > > > .../ethernet/stmicro/stmmac/stmmac_plat_lib.h | 8 +++++
> > > > > > >
> > > > > > > Wouldn't it be better to just call it "stmmac_lib{.c,.h}" in case we need to add
> > > > > > > more helpers on the future that are not only for platform-based drivers?
> > > > > >
> > > > > > What is the difference between stmmac_platform.{c,h} and
> > > > > > stmmac_plat_lib.{c,h} files? It isn't clear really. In perspective it
> > > > > > may cause confusions like mixed definitions in both of these files.
> > > > > >
> > > > > > Why not to use the stmmac_platform.{c,h} instead of adding one more
> > > > > > file?
> > > > >
> > > >
> > > > > Is stmmac_platform.{c,h} used by all the drivers that are making use of
> > > > > this? I'm not entirely sure.
> > > > >
> > > > > If it is, then yes, it can go in stmmac_platform.[ch]. If not, then I
> > > > > don't think we'd want the bloat of forcing all of stmmac_platform.[ch]
> > > > > onto drivers that only want to use this one function.
> > > >
> > > > With a few exceptions almost all the STMMAC/DW*MAC glue drivers use
> > > > the methods from the stmmac_platform.c module including the bits
> > > > touched by your patchset. AFAICS semantically both stmmac_platform.c
> > > > and stmmac_plat_lib.c look the same. They don't do anything on its own
> > > > but provide some common methods utilized by the glue drivers for some
> > > > platform-specific setups. So basically stmmac_platform.[ch] is already
> > > > a library of the common platform methods. There is no need in creating
> > > > another one.
> > >
> > > I'm not questioning whether it should be merged, I'm questioning whether
> > > all drivers that I'm touching make use of stmmac_platform.c, so your
> > > long winded answer was entirely unnecessary. All you needed to do was
> > > answer the question I asked, rather than teach me how to suck eggs.
> >
>
> > So what about the name of the function? Are you happy that it's called
> > "dwmac_set_tx_clk_gmii" rather than "stmmac_set_tx_clk_gmii" ?
>
> Not really. I would suggest to preserve the local naming convention:
> 1. Generic names have stmmac_ prefix.
> 2. DW *MAC IP-core-specific names have dw(xg|xlg)?mac(100|1000|2|4|5)?_ prefixes.
> Alas it was violated in some places (like norm_desc and enh_desc.c
> files) but is still mainly preserved in the driver especially in the
> stmmac_platform.c which is concerned in this case.
Thanks... so now I have you down as a single-issue reviewer - you spot
something, you comment on it, and that's as far as you go. You don't
seem to bother continuing the review and raising other points - which
leads to lots of wasted time, and lots of patch set iterations, lots
of email on mailing lists, etc.
Do you think you could review the other patches before I go to the
trouble of spinning a v2 please?
Thanks.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2023-09-14 10:49 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-11 15:28 [PATCH net-next 1/6] net: stmmac: add platform library Russell King (Oracle)
2023-09-12 7:59 ` Jose Abreu
2023-09-12 9:32 ` Serge Semin
2023-09-12 17:08 ` Russell King (Oracle)
2023-09-13 0:56 ` Serge Semin
2023-09-13 14:14 ` Russell King (Oracle)
2023-09-13 14:21 ` Russell King (Oracle)
2023-09-14 10:42 ` Serge Semin
2023-09-14 10:48 ` Russell King (Oracle) [this message]
2023-09-14 12:01 ` Serge Semin
-- strict thread matches above, loose matches on Subject: below --
2023-09-11 15:28 [PATCH net-next 0/6] net: stmmac: add and use library for setting clock Russell King (Oracle)
2023-09-11 15:29 ` [PATCH net-next 1/6] net: stmmac: add platform library Russell King (Oracle)
2023-09-12 10:18 ` Paolo Abeni
2023-09-12 14:52 ` Simon Horman
2023-09-12 22:20 ` Russell King (Oracle)
2023-09-14 11:24 ` Simon Horman
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=ZQLk6kvggzlDUyS2@shell.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=Jose.Abreu@synopsys.com \
--cc=alexandre.torgue@foss.st.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=fancer.lancer@gmail.com \
--cc=festevam@gmail.com \
--cc=hawk@kernel.org \
--cc=john.fastabend@gmail.com \
--cc=kernel@esmil.dk \
--cc=kernel@pengutronix.de \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-imx@nxp.com \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=s.hauer@pengutronix.de \
--cc=samin.guo@starfivetech.com \
--cc=shawnguo@kernel.org \
/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).