Skip to content

Commit 9cff866

Browse files
abrodkindavem330
authored andcommitted
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 <abrodkin@synopsys.com> Cc: Vineet Gupta <vgupta@synopsys.com> Cc: Mischa Jonker <mjonker@synopsys.com> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Grant Likely <grant.likely@linaro.org> Cc: Rob Herring <rob.herring@calxeda.com> Cc: Paul Gortmaker <paul.gortmaker@windriver.com> Cc: "David S. Miller" <davem@davemloft.net> Cc: linux-kernel@vger.kernel.org Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 4221f40 commit 9cff866

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/arc/emac_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ static int arc_emac_rx(struct net_device *ndev, int budget)
199199
struct arc_emac_priv *priv = netdev_priv(ndev);
200200
unsigned int work_done;
201201

202-
for (work_done = 0; work_done <= budget; work_done++) {
202+
for (work_done = 0; work_done < budget; work_done++) {
203203
unsigned int *last_rx_bd = &priv->last_rx_bd;
204204
struct net_device_stats *stats = &priv->stats;
205205
struct buffer_state *rx_buff = &priv->rx_buff[*last_rx_bd];

0 commit comments

Comments
 (0)