提交 faadb05f 编写于 作者: L Li RongQing 提交者: David S. Miller

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: NLi RongQing <roy.qing.li@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 3556eaaa
...@@ -749,9 +749,9 @@ static int virtnet_poll(struct napi_struct *napi, int budget) ...@@ -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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册