projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4f32e1c
)
net/mlx4_en: Combine checks of end-cases in RX completion function
author
Tariq Toukan
<tariqt@mellanox.com>
Tue, 27 Feb 2018 14:17:21 +0000
(16:17 +0200)
committer
David S. Miller
<davem@davemloft.net>
Tue, 27 Feb 2018 19:53:26 +0000
(14:53 -0500)
Combine two end-cases in the same if statement with a single return value.
Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx4/en_rx.c
patch
|
blob
|
history
diff --git
a/drivers/net/ethernet/mellanox/mlx4/en_rx.c
b/drivers/net/ethernet/mellanox/mlx4/en_rx.c
index b4d144e6751450a78a27139feec4dc8f128f4fcf..1e8f21b7fed891e7686a32ac20ffb89fa04ba0a7 100644
(file)
--- a/
drivers/net/ethernet/mellanox/mlx4/en_rx.c
+++ b/
drivers/net/ethernet/mellanox/mlx4/en_rx.c
@@
-662,12
+662,9
@@
int mlx4_en_process_rx_cq(struct net_device *dev, struct mlx4_en_cq *cq, int bud
int polled = 0;
int index;
- if (unlikely(!priv->port_up))
+ if (unlikely(!priv->port_up
|| budget <= 0
))
return 0;
- if (unlikely(budget <= 0))
- return polled;
-
ring = priv->rx_ring[cq_ring];
/* Protect accesses to: ring->xdp_prog, priv->mac_hash list */