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:
3556eaa
)
virtio: simplify the using of received in virtnet_poll
author
Li RongQing
<roy.qing.li@gmail.com>
Thu, 26 Mar 2015 07:39:45 +0000
(15:39 +0800)
committer
David S. Miller
<davem@davemloft.net>
Sun, 29 Mar 2015 19:37:17 +0000
(12:37 -0700)
received is 0, no need to minus it and use "+=" to reassign it
Signed-off-by: Li RongQing <roy.qing.li@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/virtio_net.c
patch
|
blob
|
history
diff --git
a/drivers/net/virtio_net.c
b/drivers/net/virtio_net.c
index 4e84236b62ce7ec8668c0a7792af318e088e29e6..a829930dac150e2910629f4d918b3dca3b493e8a 100644
(file)
--- a/
drivers/net/virtio_net.c
+++ b/
drivers/net/virtio_net.c
@@
-749,9
+749,9
@@
static int virtnet_poll(struct napi_struct *napi, int budget)
{
struct receive_queue *rq =
container_of(napi, struct receive_queue, napi);
- unsigned int r, received
= 0
;
+ unsigned int r, received;
- received
+= virtnet_receive(rq, budget - received
);
+ received
= virtnet_receive(rq, budget
);
/* Out of packets? */
if (received < budget) {