mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-15 15:15:47 +00:00
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>
This commit is contained in:
parent
3556eaaab5
commit
faadb05f4b
1 changed files with 2 additions and 2 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue