[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <656706ab.050a0220.dafe7.1925@mx.google.com>
Date: Wed, 29 Nov 2023 10:38:49 +0100
From: Christian Marangi <ansuelsmth@...il.com>
To: "Russell King (Oracle)" <linux@...linux.org.uk>
Cc: Andrew Lunn <andrew@...n.ch>,
Heiner Kallweit <hkallweit1@...il.com>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
Andy Gross <agross@...nel.org>,
Bjorn Andersson <andersson@...nel.org>,
Konrad Dybcio <konrad.dybcio@...aro.org>,
linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
linux-arm-msm@...r.kernel.org
Subject: Re: [net-next PATCH 04/14] net: phy: at803x: move qca83xx stats out
of generic at803x_priv struct
On Wed, Nov 29, 2023 at 09:29:24AM +0000, Russell King (Oracle) wrote:
> On Wed, Nov 29, 2023 at 03:12:09AM +0100, Christian Marangi wrote:
> > +struct qca83xx_priv {
> > + u64 stats[ARRAY_SIZE(qca83xx_hw_stats)];
> > +};
>
> If QCA83xx is going to use an entirely separate private data structure,
> then it's clearly a separate driver, and it should be separated from
> this driver. Having two incompatible private data structures in
> phydev->priv in the same driver is a recipe for future errors, where
> functions that expect one private data structure may be called when
> the other private data structure is stored in phydev->priv.
>
> So, if we're going to do this, then the QCA83xx support needs to
> _first_ be split from this driver.
>
As you notice later, it's really to make the split easier by first
separating all the functions and then moving the function in the
separate files.
Idea was to only move them, ok to make the probe and this change when
the PHY driver is detached but I feel it would make even more changes in
that patch. (Instead of simply removing things from 803x.c)
--
Ansuel
Powered by blists - more mailing lists