Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit faadb05f authored by Li RongQing's avatar Li RongQing Committed by David S. Miller
Browse files

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: default avatarLi RongQing <roy.qing.li@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 3556eaaa
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -749,9 +749,9 @@ static int virtnet_poll(struct napi_struct *napi, int budget)
{
{
	struct receive_queue *rq =
	struct receive_queue *rq =
		container_of(napi, struct receive_queue, napi);
		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? */
	/* Out of packets? */
	if (received < budget) {
	if (received < budget) {