Hi Russell, > -----Original Message----- > From: Russell King <rmk@xxxxxxxxxxxxxxx> On Behalf Of Russell King (Oracle) > Sent: Tuesday, February 18, 2025 7:25 PM > To: netdev@xxxxxxxxxxxxxxx > Cc: Alexandre Torgue <alexandre.torgue@xxxxxxxxxxx>; Andrew Lunn > <andrew+netdev@xxxxxxx>; Chen-Yu Tsai <wens@xxxxxxxx>; David S. Miller > <davem@xxxxxxxxxxxxx>; Drew Fustini <drew@xxxxxxxx>; Emil Renner > Berthing <kernel@xxxxxxxx>; Eric Dumazet <edumazet@xxxxxxxxxx>; Fabio > Estevam <festevam@xxxxxxxxx>; Fu Wei <wefu@xxxxxxxxxx>; Guo Ren > <guoren@xxxxxxxxxx>; imx@xxxxxxxxxxxxxxx; Jakub Kicinski > <kuba@xxxxxxxxxx>; Jan Petrous <jan.petrous@xxxxxxxxxxx>; Jernej Skrabec > <jernej.skrabec@xxxxxxxxx>; Jerome Brunet <jbrunet@xxxxxxxxxxxx>; Kevin > Hilman <khilman@xxxxxxxxxxxx>; linux-amlogic@xxxxxxxxxxxxxxxxxxx; > linux-arm-kernel@xxxxxxxxxxxxxxxxxxx; linux-arm-msm@xxxxxxxxxxxxxxx; > linux-riscv@xxxxxxxxxxxxxxxxxxx; linux-stm32@xxxxxxxxxxxxxxxxxxxxxxxxxxxx; > linux-sunxi@xxxxxxxxxxxxxxx; Martin Blumenstingl > <martin.blumenstingl@xxxxxxxxxxxxxx>; Maxime Coquelin > <mcoquelin.stm32@xxxxxxxxx>; Minda Chen > <minda.chen@xxxxxxxxxxxxxxxx>; Neil Armstrong > <neil.armstrong@xxxxxxxxxx>; iwamatsu nobuhiro(岩松 信洋 ○DITC□D > IT○OST) <nobuhiro1.iwamatsu@xxxxxxxxxxxxx>; NXP S32 Linux Team > <s32@xxxxxxx>; Paolo Abeni <pabeni@xxxxxxxxxx>; Pengutronix Kernel > Team <kernel@xxxxxxxxxxxxxx>; Samuel Holland <samuel@xxxxxxxxxxxx>; > Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>; Shawn Guo > <shawnguo@xxxxxxxxxx>; Vinod Koul <vkoul@xxxxxxxxxx> > Subject: [PATCH net-next 3/3] net: stmmac: "speed" passed to fix_mac_speed > is an int > > priv->plat->fix_mac_speed() is called from stmmac_mac_link_up(), which > is passed the speed as an "int". However, fix_mac_speed() implicitly casts this > to an unsigned int. Some platform glue code print this value using %u, others > with %d. Some implicitly cast it back to an int, and others to u32. > > Good practice is to use one type and only one type to represent a value being > passed around a driver. > > Switch all of these over to consistently use "int" when dealing with a speed > passed from stmmac_mac_link_up(), even though the speed will always be > positive. > > Signed-off-by: Russell King (Oracle) <rmk+kernel@xxxxxxxxxxxxxxx> > --- > drivers/net/ethernet/stmicro/stmmac/dwmac-visconti.c | 2 +- Acked-by: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@xxxxxxxxxxxxx> Best regards, Nobuhiro