lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1669616174.7244327-2-xuanzhuo@linux.alibaba.com>
Date:   Mon, 28 Nov 2022 14:16:14 +0800
From:   Xuan Zhuo <xuanzhuo@...ux.alibaba.com>
To:     Davidlohr Bueso <dave@...olabs.net>
Cc:     dave@...olabs.net, linux-kernel@...r.kernel.org,
        virtualization@...ts.linux-foundation.org, mst@...hat.com
Subject: Re: [PATCH 1/2] tools/virtio: remove stray characters

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

Reviewed-by: Xuan Zhuo <xuanzhuo@...ux.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@...ts.linux-foundation.org
> https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ