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

From: Shenwei Wang
Date: Tue Aug 01 2023 - 14:44:02 EST




> -----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
>
> 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.

Thanks,
Shenwei

> Just my 2 cent,
> Marc
>
> --
> Pengutronix e.K. | Marc Kleine-Budde |
> Embedded Linux | https://www.pengutronix.de |
> Vertretung Nürnberg | Phone: +49-5121-206917-129 |
> Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-9 |