提交 8aeac42d 编写于 作者: D Davidlohr Bueso 提交者: Michael S. Tsirkin

tools/virtio: remove stray characters

__read_once_size() is not a macro, remove those '/'s.
Signed-off-by: NDavidlohr Bueso <dave@stgolabs.net>
Message-Id: <20221128034347.990-2-dave@stgolabs.net>
Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
Reviewed-by: NXuan Zhuo <xuanzhuo@linux.alibaba.com>
上级 e794070a
...@@ -149,16 +149,16 @@ static inline void busy_wait(void) ...@@ -149,16 +149,16 @@ static inline void busy_wait(void)
static __always_inline static __always_inline
void __read_once_size(const volatile void *p, void *res, int size) void __read_once_size(const volatile void *p, void *res, int size)
{ {
switch (size) { \ switch (size) {
case 1: *(unsigned char *)res = *(volatile unsigned char *)p; break; \ case 1: *(unsigned char *)res = *(volatile unsigned char *)p; break;
case 2: *(unsigned short *)res = *(volatile unsigned short *)p; break; \ case 2: *(unsigned short *)res = *(volatile unsigned short *)p; break;
case 4: *(unsigned int *)res = *(volatile unsigned int *)p; break; \ case 4: *(unsigned int *)res = *(volatile unsigned int *)p; break;
case 8: *(unsigned long long *)res = *(volatile unsigned long long *)p; break; \ case 8: *(unsigned long long *)res = *(volatile unsigned long long *)p; break;
default: \ default:
barrier(); \ barrier();
__builtin_memcpy((void *)res, (const void *)p, size); \ __builtin_memcpy((void *)res, (const void *)p, size);
barrier(); \ barrier();
} \ }
} }
static __always_inline void __write_once_size(volatile void *p, void *res, int size) static __always_inline void __write_once_size(volatile void *p, void *res, int size)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册