]> www.infradead.org Git - users/dwmw2/linux.git/commit
net: stmmac: use unsigned int for eee_timer
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Wed, 8 Jan 2025 16:47:49 +0000 (16:47 +0000)
committerJakub Kicinski <kuba@kernel.org>
Sat, 11 Jan 2025 01:51:01 +0000 (17:51 -0800)
commit7e19a351b22d585086d16cbc6ea7c613fb12e2da
tree0f80884b185eb7f5888dac2a4941a3a721133ff2
parentbba9f4765515d45b3fd71ebf4a622e830b412f45
net: stmmac: use unsigned int for eee_timer

Since eee_timer is used to initialise priv->tx_lpi_timer, this also
should be unsigned to avoid a negative number being interpreted as a
very large positive number. Note that this makes the check for negative
numbers passed in as a module parameter redundant, and passing a
negative number will now produce a large delay rather than the
default. Since the default is used without an argument, passing a
negative number would be quite obscure. However, if users do, then
this will need to be revisited.

Reviewed-by: Simon Horman <horms@kernel.org>
Tested-by: Choong Yong Liang <yong.liang.choong@linux.intel.com>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Link: https://patch.msgid.link/E1tVZDh-0002K3-6y@rmk-PC.armlinux.org.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c