Linux virtualization list
 help / color / mirror / Atom feed
From: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
To: Davidlohr Bueso <dave@stgolabs.net>
Cc: dave@stgolabs.net, mst@redhat.com, linux-kernel@vger.kernel.org,
	virtualization@lists.linux-foundation.org
Subject: Re: [PATCH 1/2] tools/virtio: remove stray characters
Date: Mon, 28 Nov 2022 14:16:14 +0800	[thread overview]
Message-ID: <1669616174.7244327-2-xuanzhuo@linux.alibaba.com> (raw)
In-Reply-To: <20221128034347.990-2-dave@stgolabs.net>

On Sun, 27 Nov 2022 19:43:46 -0800, Davidlohr Bueso <dave@stgolabs.net> wrote:
> __read_once_size() is not a macro, remove those '/'s.
>
> Signed-off-by: Davidlohr Bueso <dave@stgolabs.net>

Reviewed-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com>

> ---
>  tools/virtio/ringtest/main.h | 20 ++++++++++----------
>  1 file changed, 10 insertions(+), 10 deletions(-)
>
> diff --git a/tools/virtio/ringtest/main.h b/tools/virtio/ringtest/main.h
> index 6d1fccd3d86c..9ed09caa659e 100644
> --- a/tools/virtio/ringtest/main.h
> +++ b/tools/virtio/ringtest/main.h
> @@ -149,16 +149,16 @@ static inline void busy_wait(void)
>  static __always_inline
>  void __read_once_size(const volatile void *p, void *res, int size)
>  {
> -        switch (size) {                                                 \
> -        case 1: *(unsigned char *)res = *(volatile unsigned char *)p; break;              \
> -        case 2: *(unsigned short *)res = *(volatile unsigned short *)p; break;            \
> -        case 4: *(unsigned int *)res = *(volatile unsigned int *)p; break;            \
> -        case 8: *(unsigned long long *)res = *(volatile unsigned long long *)p; break;            \
> -        default:                                                        \
> -                barrier();                                              \
> -                __builtin_memcpy((void *)res, (const void *)p, size);   \
> -                barrier();                                              \
> -        }                                                               \
> +	switch (size) {
> +	case 1: *(unsigned char *)res = *(volatile unsigned char *)p; break;
> +	case 2: *(unsigned short *)res = *(volatile unsigned short *)p; break;
> +	case 4: *(unsigned int *)res = *(volatile unsigned int *)p; break;
> +	case 8: *(unsigned long long *)res = *(volatile unsigned long long *)p; break;
> +	default:
> +		barrier();
> +		__builtin_memcpy((void *)res, (const void *)p, size);
> +		barrier();
> +	}
>  }
>
>  static __always_inline void __write_once_size(volatile void *p, void *res, int size)
> --
> 2.38.1
>
> _______________________________________________
> Virtualization mailing list
> Virtualization@lists.linux-foundation.org
> https://lists.linuxfoundation.org/mailman/listinfo/virtualization
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

  reply	other threads:[~2022-11-28  6:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-28  3:43 [PATCH 0/2] tools/virtio: remove smp_read_barrier_depends() Davidlohr Bueso
2022-11-28  3:43 ` [PATCH 1/2] tools/virtio: remove stray characters Davidlohr Bueso
2022-11-28  6:16   ` Xuan Zhuo [this message]
2022-11-28  3:43 ` [PATCH 2/2] tools/virtio: remove smp_read_barrier_depends() Davidlohr Bueso
2022-11-28  6:16   ` Xuan Zhuo

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=1669616174.7244327-2-xuanzhuo@linux.alibaba.com \
    --to=xuanzhuo@linux.alibaba.com \
    --cc=dave@stgolabs.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=virtualization@lists.linux-foundation.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