Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

net: stmmac: Remove redundant checking for rx_coalesce_usecs

The datatype of rx_coalesce_usecs is u32, always larger or equal to zero.
Previous checking does not include value 0, this patch removes the
checking to handle the value 0. This change in behaviour making the
value of 0 cause an error is not a problem because 0 is out of
range of rx_coalesce_usecs.

Signed-off-by: Gan Yi Fang <yi.fang.gan@intel.com>
Link: https://lore.kernel.org/r/20231018030802.741923-1-yi.fang.gan@intel.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>

authored by

Gan Yi Fang and committed by
Paolo Abeni
392c226c b91f2e13

+1 -1
+1 -1
drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c
··· 981 981 else if (queue >= max_cnt) 982 982 return -EINVAL; 983 983 984 - if (priv->use_riwt && (ec->rx_coalesce_usecs > 0)) { 984 + if (priv->use_riwt) { 985 985 rx_riwt = stmmac_usec2riwt(ec->rx_coalesce_usecs, priv); 986 986 987 987 if ((rx_riwt > MAX_DMA_RIWT) || (rx_riwt < MIN_DMA_RIWT))