[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <47df2f0d-3410-43c2-96d3-87af47cfdcce@lunn.ch>
Date: Thu, 30 Nov 2023 16:21:50 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Christian Marangi <ansuelsmth@...il.com>
Cc: Heiner Kallweit <hkallweit1@...il.com>,
Russell King <linux@...linux.org.uk>,
"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 06/14] net: phy: at803x: move at8031 specific
data out of generic at803x_priv
> +struct at8031_data {
> + bool is_fiber;
> + bool is_1000basex;
> + struct regulator_dev *vddio_rdev;
> + struct regulator_dev *vddh_rdev;
> +};
> +
> struct at803x_priv {
> int flags;
> u16 clk_25m_reg;
> u16 clk_25m_mask;
> u8 smarteee_lpi_tw_1g;
> u8 smarteee_lpi_tw_100m;
> - bool is_fiber;
> - bool is_1000basex;
> - struct regulator_dev *vddio_rdev;
> - struct regulator_dev *vddh_rdev;
> +
> + /* Specific data for at8031 PHYs */
> + void *data;
> };
I don't really like this void *
Go through at803x_priv and find out what is common to them all, and
keep that in one structure. Add per family private structures which
include the common as a member.
By having real types everywhere you get the compiler doing checks for
you.
As Russell pointed out, this patch series is going to be too big. So
break it up. We can move fast on patches which are simple and
obviously correct.
Andrew
Powered by blists - more mailing lists