2021-07-13 16:11:31

by Xianting Tian

[permalink] [raw]
Subject: [PATCH] virtio-balloon: Use virtio_find_vqs() helper

From: Xianting Tian <[email protected]>

Use the helper virtio_find_vqs().

Signed-off-by: Xianting Tian <[email protected]>
---
drivers/virtio/virtio_balloon.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c
index 510e931..18e0bf3 100644
--- a/drivers/virtio/virtio_balloon.c
+++ b/drivers/virtio/virtio_balloon.c
@@ -531,8 +531,8 @@ static int init_vqs(struct virtio_balloon *vb)
callbacks[VIRTIO_BALLOON_VQ_REPORTING] = balloon_ack;
}

- err = vb->vdev->config->find_vqs(vb->vdev, VIRTIO_BALLOON_VQ_MAX,
- vqs, callbacks, names, NULL, NULL);
+ err = virtio_find_vqs(vb->vdev, VIRTIO_BALLOON_VQ_MAX, vqs,
+ callbacks, names, NULL);
if (err)
return err;

--
1.8.3.1


2021-07-16 12:47:43

by Xianting Tian

[permalink] [raw]
Subject: Re: [PATCH] virtio-balloon: Use virtio_find_vqs() helper

Do you interest in this patch? just little improvment:)

?? 2021/7/13 ????11:38, Xianting Tian д??:
> From: Xianting Tian <[email protected]>
>
> Use the helper virtio_find_vqs().
>
> Signed-off-by: Xianting Tian <[email protected]>
> ---
> drivers/virtio/virtio_balloon.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c
> index 510e931..18e0bf3 100644
> --- a/drivers/virtio/virtio_balloon.c
> +++ b/drivers/virtio/virtio_balloon.c
> @@ -531,8 +531,8 @@ static int init_vqs(struct virtio_balloon *vb)
> callbacks[VIRTIO_BALLOON_VQ_REPORTING] = balloon_ack;
> }
>
> - err = vb->vdev->config->find_vqs(vb->vdev, VIRTIO_BALLOON_VQ_MAX,
> - vqs, callbacks, names, NULL, NULL);
> + err = virtio_find_vqs(vb->vdev, VIRTIO_BALLOON_VQ_MAX, vqs,
> + callbacks, names, NULL);
> if (err)
> return err;
>

2021-07-16 12:54:42

by David Hildenbrand

[permalink] [raw]
Subject: Re: [PATCH] virtio-balloon: Use virtio_find_vqs() helper

On 16.07.21 14:46, tianxianting wrote:
> Do you interest in this patch? just little improvment:)

I am, especially when I'm cc'ed and aware of it ;)

Reviewed-by: David Hildenbrand <[email protected]>

One nit below

>
> ?? 2021/7/13 ????11:38, Xianting Tian д??:
>> From: Xianting Tian <[email protected]>
>>
>> Use the helper virtio_find_vqs().
>>
>> Signed-off-by: Xianting Tian <[email protected]>
>> ---
>> drivers/virtio/virtio_balloon.c | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c
>> index 510e931..18e0bf3 100644
>> --- a/drivers/virtio/virtio_balloon.c
>> +++ b/drivers/virtio/virtio_balloon.c
>> @@ -531,8 +531,8 @@ static int init_vqs(struct virtio_balloon *vb)
>> callbacks[VIRTIO_BALLOON_VQ_REPORTING] = balloon_ack;
>> }
>>
>> - err = vb->vdev->config->find_vqs(vb->vdev, VIRTIO_BALLOON_VQ_MAX,
>> - vqs, callbacks, names, NULL, NULL);
>> + err = virtio_find_vqs(vb->vdev, VIRTIO_BALLOON_VQ_MAX, vqs,
>> + callbacks, names, NULL);
^
we tend to indent this such that it is aligned with the line above (see
the old code), unless the code becomes unreadable


--
Thanks,

David / dhildenb

2021-07-16 13:11:39

by David Hildenbrand

[permalink] [raw]
Subject: Re: [PATCH] virtio-balloon: Use virtio_find_vqs() helper

On 16.07.21 14:53, David Hildenbrand wrote:
> On 16.07.21 14:46, tianxianting wrote:
>> Do you interest in this patch? just little improvment:)
>
> I am, especially when I'm cc'ed and aware of it ;)
>

Sorry, just found it in my gmail spam folder ... WTH. Why does the
original one get filtered but not your ping ...

--
Thanks,

David / dhildenb

2021-07-16 14:20:08

by Xianting Tian

[permalink] [raw]
Subject: Re: [PATCH] virtio-balloon: Use virtio_find_vqs() helper

you really were in the ??to?? list of my original email????

?? 2021/7/16 ????9:10, David Hildenbrand д??:
> On 16.07.21 14:53, David Hildenbrand wrote:
>> On 16.07.21 14:46, tianxianting wrote:
>>> Do you interest in this patch? just little improvment:)
>>
>> I am, especially when I'm cc'ed and aware of it ;)
>>
>
> Sorry, just found it in my gmail spam folder ... WTH. Why does the
> original one get filtered but not your ping ...
>

2021-07-19 03:49:50

by Jason Wang

[permalink] [raw]
Subject: Re: [PATCH] virtio-balloon: Use virtio_find_vqs() helper


在 2021/7/16 下午8:46, tianxianting 写道:
> Do you interest in this patch? just little improvment:)
>
> 在 2021/7/13 下午11:38, Xianting Tian 写道:
>> From: Xianting Tian <[email protected]>
>>
>> Use the helper virtio_find_vqs().
>>
>> Signed-off-by: Xianting Tian <[email protected]>
>> ---
>>   drivers/virtio/virtio_balloon.c | 4 ++--
>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/virtio/virtio_balloon.c
>> b/drivers/virtio/virtio_balloon.c
>> index 510e931..18e0bf3 100644
>> --- a/drivers/virtio/virtio_balloon.c
>> +++ b/drivers/virtio/virtio_balloon.c
>> @@ -531,8 +531,8 @@ static int init_vqs(struct virtio_balloon *vb)
>>           callbacks[VIRTIO_BALLOON_VQ_REPORTING] = balloon_ack;
>>       }
>>   -    err = vb->vdev->config->find_vqs(vb->vdev, VIRTIO_BALLOON_VQ_MAX,
>> -                     vqs, callbacks, names, NULL, NULL);
>> +    err = virtio_find_vqs(vb->vdev, VIRTIO_BALLOON_VQ_MAX, vqs,
>> +                callbacks, names, NULL);
>>       if (err)
>>           return err;
>

Acked-by: Jason Wang <[email protected]>

Maybe it's better to convert all the drivers that doesn't use
virtio_find_vqs{_ctx}.

Thanks

2021-07-19 04:25:23

by Xianting Tian

[permalink] [raw]
Subject: Re: [PATCH] virtio-balloon: Use virtio_find_vqs() helper

thanks,

I checked, actually all virtio drivers have switched to use the helper
after this one merged.

在 2021/7/19 上午11:46, Jason Wang 写道:
>
> 在 2021/7/16 下午8:46, tianxianting 写道:
>> Do you interest in this patch? just little improvment:)
>>
>> 在 2021/7/13 下午11:38, Xianting Tian 写道:
>>> From: Xianting Tian <[email protected]>
>>>
>>> Use the helper virtio_find_vqs().
>>>
>>> Signed-off-by: Xianting Tian <[email protected]>
>>> ---
>>>   drivers/virtio/virtio_balloon.c | 4 ++--
>>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/drivers/virtio/virtio_balloon.c
>>> b/drivers/virtio/virtio_balloon.c
>>> index 510e931..18e0bf3 100644
>>> --- a/drivers/virtio/virtio_balloon.c
>>> +++ b/drivers/virtio/virtio_balloon.c
>>> @@ -531,8 +531,8 @@ static int init_vqs(struct virtio_balloon *vb)
>>>           callbacks[VIRTIO_BALLOON_VQ_REPORTING] = balloon_ack;
>>>       }
>>>   -    err = vb->vdev->config->find_vqs(vb->vdev,
>>> VIRTIO_BALLOON_VQ_MAX,
>>> -                     vqs, callbacks, names, NULL, NULL);
>>> +    err = virtio_find_vqs(vb->vdev, VIRTIO_BALLOON_VQ_MAX, vqs,
>>> +                callbacks, names, NULL);
>>>       if (err)
>>>           return err;
>>
>
> Acked-by: Jason Wang <[email protected]>
>
> Maybe it's better to convert all the drivers that doesn't use
> virtio_find_vqs{_ctx}.
>
> Thanks

2021-07-20 02:44:32

by Jason Wang

[permalink] [raw]
Subject: Re: [PATCH] virtio-balloon: Use virtio_find_vqs() helper


在 2021/7/19 下午12:22, tianxianting 写道:
> thanks,
>
> I checked, actually all virtio drivers have switched to use the helper
> after this one merged.


Ok. Cool.

Thanks


>
> 在 2021/7/19 上午11:46, Jason Wang 写道:
>>
>> 在 2021/7/16 下午8:46, tianxianting 写道:
>>> Do you interest in this patch? just little improvment:)
>>>
>>> 在 2021/7/13 下午11:38, Xianting Tian 写道:
>>>> From: Xianting Tian <[email protected]>
>>>>
>>>> Use the helper virtio_find_vqs().
>>>>
>>>> Signed-off-by: Xianting Tian <[email protected]>
>>>> ---
>>>>   drivers/virtio/virtio_balloon.c | 4 ++--
>>>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>>>
>>>> diff --git a/drivers/virtio/virtio_balloon.c
>>>> b/drivers/virtio/virtio_balloon.c
>>>> index 510e931..18e0bf3 100644
>>>> --- a/drivers/virtio/virtio_balloon.c
>>>> +++ b/drivers/virtio/virtio_balloon.c
>>>> @@ -531,8 +531,8 @@ static int init_vqs(struct virtio_balloon *vb)
>>>>           callbacks[VIRTIO_BALLOON_VQ_REPORTING] = balloon_ack;
>>>>       }
>>>>   -    err = vb->vdev->config->find_vqs(vb->vdev,
>>>> VIRTIO_BALLOON_VQ_MAX,
>>>> -                     vqs, callbacks, names, NULL, NULL);
>>>> +    err = virtio_find_vqs(vb->vdev, VIRTIO_BALLOON_VQ_MAX, vqs,
>>>> +                callbacks, names, NULL);
>>>>       if (err)
>>>>           return err;
>>>
>>
>> Acked-by: Jason Wang <[email protected]>
>>
>> Maybe it's better to convert all the drivers that doesn't use
>> virtio_find_vqs{_ctx}.
>>
>> Thanks
>