linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tools/virtio: use 'unsigned int' instead of bare 'unsigned'
@ 2021-07-29  0:04 Jason Wang
  2021-08-05 22:15 ` Michael S. Tsirkin
  0 siblings, 1 reply; 2+ messages in thread
From: Jason Wang @ 2021-07-29  0:04 UTC (permalink / raw)
  To: jasowang; +Cc: mst, virtualization, linux-kernel, Jason Wang

Replace the lazy way 'unsigned' with 'unsigned int' which is more
accurate.

Signed-off-by: Jason Wang <wangborong@cdjrlc.com>
---
 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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] tools/virtio: use 'unsigned int' instead of bare 'unsigned'
  2021-07-29  0:04 [PATCH] tools/virtio: use 'unsigned int' instead of bare 'unsigned' Jason Wang
@ 2021-08-05 22:15 ` Michael S. Tsirkin
  0 siblings, 0 replies; 2+ messages in thread
From: Michael S. Tsirkin @ 2021-08-05 22:15 UTC (permalink / raw)
  To: Jason Wang; +Cc: jasowang, virtualization, linux-kernel

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-08-05 22:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-29  0:04 [PATCH] tools/virtio: use 'unsigned int' instead of bare 'unsigned' Jason Wang
2021-08-05 22:15 ` Michael S. Tsirkin

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).