diff options
author | Russell King (Oracle) <rmk+kernel@armlinux.org.uk> | 2025-02-18 13:24:34 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2025-02-20 05:57:28 +0300 |
commit | bc9d75b0aaed795dcd6009336500fd6094e0c944 (patch) | |
tree | fa8421fb51020041df2bf0409b94c13f1497605b /tools/testing/selftests/drivers/net/lib/py/env.py | |
parent | ff1a9b2e311f6894afe39b0000dc7482498eb2d1 (diff) | |
download | linux-bc9d75b0aaed795dcd6009336500fd6094e0c944.tar.xz |
net: stmmac: remove useless priv->flow_ctrl
priv->flow_ctrl is only accessed by stmmac_main.c, and the only place
that it is read is in stmmac_mac_flow_ctrl(). This function is only
called from stmmac_mac_link_up() which always sets priv->flow_ctrl
immediately before calling this function.
Therefore, initialising this at probe time is ineffectual because it
will always be overwritten before it's read. As such, the "flow_ctrl"
module parameter has been useless for some time. Rather than remove
the module parameter, which would risk module load failure, change the
description to indicate that it is obsolete, and warn if it is set by
userspace.
Moreover, storing the value in the stmmac_priv has no benefit as it's
set and then immediately read stmmac_mac_flow_ctrl(). Instead, pass it
as a parameter to this function..
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
Link: https://patch.msgid.link/E1tkKmI-004ObG-DL@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