ethernet/arc/arc_emac - fix NAPI "work > weight" warning
Subsystems (2)
PATCH 1/1 ethernet/arc/arc_emac - fix NAPI "work > weight" warning
Initially I improperly set a boundary for maximum number of input packets to process on NAPI poll ("work") so it might be more than expected amount ("weight").
This was really harmless but seeing WARN_ON_ONCE on every device boot is not nice. So trivial fix ("<" instead of "<=") is here.
Signed-off-by Alexey Brodkin <[email protected]>
Cc Vineet Gupta <[email protected]>
Cc Mischa Jonker <[email protected]>
Cc Arnd Bergmann <[email protected]>
Cc Grant Likely <[email protected]>
Cc Rob Herring <[email protected]>
Cc Paul Gortmaker <[email protected]>
Cc "David S. Miller" <[email protected]>
--- drivers/net/ethernet/arc/emac_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/arc/emac_main.c +1 -1
@@ -199,7 +199,7 @@ static int arc_emac_rx(struct net_device *ndev, int budget)struct arc_emac_priv *priv =netdev_priv (ndev);unsigned int work_done; -for (work_done =0 ; work_done <= budget; work_done++) { +for (work_done =0 ; work_done < budget; work_done++) {unsigned int *last_rx_bd = &priv->last_rx_bd;struct net_device_stats *stats = &priv->stats;struct buffer_state *rx_buff = &priv->rx_buff[*last_rx_bd];
Signature · 1 line
1.8.1.2
From: Alexey Brodkin <[email protected]>
Date: Tue, 13 Aug 2013 17:04:36 +0400
Quoted 8 lines
Initially I improperly set a boundary for maximum number of input packets to process on NAPI poll ("work") so it might be more than expected amount ("weight").
This was really harmless but seeing
WARN_ON_ONCEon every device boot is not nice. So trivial fix ("<" instead of "<=") is here.Signed-off-by Alexey Brodkin <[email protected]>
Applied, thanks.