diff options
author | Li RongQing <roy.qing.li@gmail.com> | 2015-03-26 15:39:45 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-03-29 12:37:17 -0700 |
commit | faadb05f4b7f11b3063a20d7fc5afcbf1124dbeb (patch) | |
tree | 5ff54f85189b3520cee7a1aa93e9f2a24ea42df7 | |
parent | 3556eaaab566e478a4ed68041a7cacfd8974662a (diff) | |
download | linux-faadb05f4b7f11b3063a20d7fc5afcbf1124dbeb.tar.bz2 |
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>
-rw-r--r-- | drivers/net/virtio_net.c | 4 |
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) { |