diff options
author | Russell King (Oracle) <rmk+kernel@armlinux.org.uk> | 2025-02-18 13:24:39 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2025-02-20 05:57:28 +0300 |
commit | ac9a8587edc78f3a66fdf6a99973ef151cbff72a (patch) | |
tree | 727a928e1d5c3437b27858fe0777046a36c39602 /tools/testing/selftests/drivers/net/lib/py/env.py | |
parent | bc9d75b0aaed795dcd6009336500fd6094e0c944 (diff) | |
download | linux-ac9a8587edc78f3a66fdf6a99973ef151cbff72a.tar.xz |
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@armlinux.org.uk>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Acked-by: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
Link: https://patch.msgid.link/E1tkKmN-004ObM-Ge@rmk-PC.armlinux.org.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/testing/selftests/drivers/net/lib/py/env.py')
0 files changed, 0 insertions, 0 deletions