On 2023/6/30 18:20, Philippe Mathieu-Daudé wrote:
> On 30/6/23 10:54, Hawkins Jiawei wrote:
>> This patch reorganizes the vdpa_feature_bits array
>> in ascending order based on its value to avoid future duplicates.
>>
>> Signed-off-by: Hawkins Jiawei <[email protected]>
>> ---
>> v2:
>>    - resolve conflicts with the master branch
>>
>> v1:
>> https://lists.nongnu.org/archive/html/qemu-devel/2023-06/msg01585.html
>>
>>   net/vhost-vdpa.c | 24 +++++++++++++-----------
>>   1 file changed, 13 insertions(+), 11 deletions(-)
>>
>> diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c
>> index 0479988a79..db7f1241af 100644
>> --- a/net/vhost-vdpa.c
>> +++ b/net/vhost-vdpa.c
>> @@ -50,15 +50,12 @@ typedef struct VhostVDPAState {
>>       bool started;
>>   } VhostVDPAState;
>> +/* The array is sorted in ascending order based on its value */
>
> Alphabetically would have been simpler IMO, anyhow:

Yes, it seems that rearranging the array in alphabetical order could
improve the maintainability of the code.

I will sort the features alphabetically, excluding
VHOST_INVALID_FEATURE_BIT, according to your suggestion.

Thanks!

> Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
>

Reply via email to