qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Hawkins Jiawei <yin31149@gmail.com>
To: "Philippe Mathieu-Daudé" <philmd@linaro.org>,
	jasowang@redhat.com, mst@redhat.com, eperezma@redhat.com
Cc: qemu-devel@nongnu.org, 18801353760@163.com,
	 QEMU Trivial <qemu-trivial@nongnu.org>
Subject: Re: [PATCH v2 2/2] vdpa: order vdpa_feature_bits array
Date: Fri, 30 Jun 2023 20:18:29 +0800	[thread overview]
Message-ID: <CAKrof1M8LRoMy4GgJubNakh1=Nob98ba3Zpp_8ojysKqXGhAEQ@mail.gmail.com> (raw)
In-Reply-To: <23c90163-657e-3d4b-0c74-437650a3e282@linaro.org>

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 <yin31149@gmail.com>
>> ---
>> 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é <philmd@linaro.org>
>


      reply	other threads:[~2023-06-30 12:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-30  8:54 [PATCH v2 0/2] vdpa: refactor vdpa_feature_bits array Hawkins Jiawei
2023-06-30  8:54 ` [PATCH v2 1/2] vdpa: delete duplicated VIRTIO_NET_F_RSS in vdpa_feature_bits Hawkins Jiawei
2023-06-30 10:19   ` Philippe Mathieu-Daudé
2023-06-30  8:54 ` [PATCH v2 2/2] vdpa: order vdpa_feature_bits array Hawkins Jiawei
2023-06-30 10:20   ` Philippe Mathieu-Daudé
2023-06-30 12:18     ` Hawkins Jiawei [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAKrof1M8LRoMy4GgJubNakh1=Nob98ba3Zpp_8ojysKqXGhAEQ@mail.gmail.com' \
    --to=yin31149@gmail.com \
    --cc=18801353760@163.com \
    --cc=eperezma@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=mst@redhat.com \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).