From: "Michael S. Tsirkin" <mst@redhat.com>
To: Jason Wang <wangborong@cdjrlc.com>
Cc: linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org
Subject: Re: [PATCH] tools/virtio: use 'unsigned int' instead of bare 'unsigned'
Date: Thu, 5 Aug 2021 18:15:13 -0400 [thread overview]
Message-ID: <20210805181436-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20210729000402.45690-1-wangborong@cdjrlc.com>
On Thu, Jul 29, 2021 at 08:04:02AM +0800, Jason Wang wrote:
> Replace the lazy way 'unsigned' with 'unsigned int' which is more
> accurate.
>
> Signed-off-by: Jason Wang <wangborong@cdjrlc.com>
I don't see why this is more accurate. AFAIK it's exactly the same.
> ---
> tools/virtio/vringh_test.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tools/virtio/vringh_test.c b/tools/virtio/vringh_test.c
> index fa87b58bd5fa..3e85f4ec210d 100644
> --- a/tools/virtio/vringh_test.c
> +++ b/tools/virtio/vringh_test.c
> @@ -447,7 +447,7 @@ int main(int argc, char *argv[])
> char buf[28];
> u16 head;
> int err;
> - unsigned i;
> + unsigned int i;
> void *ret;
> bool (*getrange)(struct vringh *vrh, u64 addr, struct vringh_range *r);
> bool fast_vringh = false, parallel = false;
> @@ -654,7 +654,7 @@ int main(int argc, char *argv[])
>
> /* Free those buffers. */
> for (i = 0; i < RINGSIZE; i++) {
> - unsigned len;
> + unsigned int len;
> assert(virtqueue_get_buf(vq, &len) != NULL);
> }
>
> --
> 2.32.0
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
parent reply other threads:[~2021-08-05 22:15 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20210729000402.45690-1-wangborong@cdjrlc.com>]
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=20210805181436-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=virtualization@lists.linux-foundation.org \
--cc=wangborong@cdjrlc.com \
/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).