Re: [EXT] Re: [PATCH v3 net 1/2] net: stmmac: add new mode parameter for fix_mac_speed

From: Jakub Kicinski
Date: Tue Aug 01 2023 - 15:58:36 EST


On Tue, 1 Aug 2023 18:43:52 +0000 Shenwei Wang wrote:
> Subject: RE: [EXT] Re: [PATCH v3 net 1/2] net: stmmac: add new mode parameter for fix_mac_speed

Looks like new platform enablement, the correct tree to target this
at is net-next (i.e. [PATCH net-next]).

> > -----Original Message-----
> > From: Marc Kleine-Budde <mkl@xxxxxxxxxxxxxx>
> > Sent: Tuesday, August 1, 2023 1:37 AM
> > To: Shenwei Wang <shenwei.wang@xxxxxxx>
> > Cc: Russell King <linux@xxxxxxxxxxxxxxx>; David S. Miller
> > <davem@xxxxxxxxxxxxx>; Eric Dumazet <edumazet@xxxxxxxxxx>; Jakub
> > Kicinski <kuba@xxxxxxxxxx>; Paolo Abeni <pabeni@xxxxxxxxxx>; Maxime
> > Coquelin <mcoquelin.stm32@xxxxxxxxx>; Shawn Guo <shawnguo@xxxxxxxxxx>;
> > Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>; Neil Armstrong
> > <neil.armstrong@xxxxxxxxxx>; Kevin Hilman <khilman@xxxxxxxxxxxx>; Vinod
> > Koul <vkoul@xxxxxxxxxx>; Chen-Yu Tsai <wens@xxxxxxxx>; Jernej Skrabec
> > <jernej.skrabec@xxxxxxxxx>; Samuel Holland <samuel@xxxxxxxxxxxx>; Jose
> > Abreu <joabreu@xxxxxxxxxxxx>; imx@xxxxxxxxxxxxxxx; Simon Horman
> > <simon.horman@xxxxxxxxxxxx>; Alexandre Torgue
> > <alexandre.torgue@xxxxxxxxxxx>; Giuseppe Cavallaro
> > <peppe.cavallaro@xxxxxx>; Nobuhiro Iwamatsu
> > <nobuhiro1.iwamatsu@xxxxxxxxxxxxx>; Fabio Estevam <festevam@xxxxxxxxx>;
> > linux-stm32@xxxxxxxxxxxxxxxxxxxxxxxxxxxx; Jerome Brunet
> > <jbrunet@xxxxxxxxxxxx>; Bartosz Golaszewski
> > <bartosz.golaszewski@xxxxxxxxxx>; Wong Vee Khee <veekhee@xxxxxxxxx>; dl-
> > linux-imx <linux-imx@xxxxxxx>; Andrew Halaney <ahalaney@xxxxxxxxxx>;
> > Bhupesh Sharma <bhupesh.sharma@xxxxxxxxxx>; Martin Blumenstingl
> > <martin.blumenstingl@xxxxxxxxxxxxxx>; Revanth Kumar Uppala
> > <ruppala@xxxxxxxxxx>; Jochen Henneberg <jh@xxxxxxxxxxxxxxxxxxxxxxxxxx>;
> > linux-amlogic@xxxxxxxxxxxxxxxxxxx; linux-arm-kernel@xxxxxxxxxxxxxxxxxxx;
> > netdev@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; Pengutronix Kernel
> > Team <kernel@xxxxxxxxxxxxxx>
> > Subject: [EXT] Re: [PATCH v3 net 1/2] net: stmmac: add new mode parameter
> > for fix_mac_speed

Why is this quote included? Please get a sane email client.

> > On 31.07.2023 11:19:28, Shenwei Wang wrote:
> > > A mode parameter has been added to the callback function of
> > > fix_mac_speed to indicate the physical layer type.
> > >
> > > The mode can be one the following:
> > > MLO_AN_PHY - Conventional PHY
> > > MLO_AN_FIXED - Fixed-link mode
> > > MLO_AN_INBAND - In-band protocol
> > >
> > > Also use short version of 'uint' to replace the 'unsigned int' in the
> > > function definitions.
> >
> > There are not many users of 'uint' in the kernel and it's not used in the stmmac
> > driver so far. From my point of view I would not introduce it and stick to the
> > standard 'unsigned int'.
>
> Using 'uint' makes the code look cleaner because adding one extra
> parameter may cause some function declarations to span multiple
> lines. This change keeps function declarations compact on a single
> line.

Marc is right. Just do it.