summaryrefslogtreecommitdiffstats
path: root/drivers/net/virtio_net.c
diff options
context:
space:
mode:
authorLi RongQing <roy.qing.li@gmail.com>2015-03-26 08:39:45 +0100
committerDavid S. Miller <davem@davemloft.net>2015-03-29 21:37:17 +0200
commitfaadb05f4b7f11b3063a20d7fc5afcbf1124dbeb (patch)
tree5ff54f85189b3520cee7a1aa93e9f2a24ea42df7 /drivers/net/virtio_net.c
parentMerge branch 'be2net-next' (diff)
downloadlinux-faadb05f4b7f11b3063a20d7fc5afcbf1124dbeb.tar.xz
linux-faadb05f4b7f11b3063a20d7fc5afcbf1124dbeb.zip
virtio: simplify the using of received in virtnet_poll
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>
Diffstat (limited to 'drivers/net/virtio_net.c')
-rw-r--r--drivers/net/virtio_net.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index 4e84236b62ce..a829930dac15 100644
--- 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) {