qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 04/31] vhost: use QEMU_ALIGN_DOWN


From: Michael S. Tsirkin
Subject: Re: [Qemu-devel] [PATCH 04/31] vhost: use QEMU_ALIGN_DOWN
Date: Thu, 22 Jun 2017 21:49:45 +0300

On Thu, Jun 22, 2017 at 02:41:37PM +0200, Marc-André Lureau wrote:
> I used the clang-tidy qemu-round check to generate the fix:
> https://github.com/elmarco/clang-tools-extra
> 
> Signed-off-by: Marc-André Lureau <address@hidden>

Reviewed-by: Michael S. Tsirkin <address@hidden>

> ---
>  hw/virtio/vhost.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c
> index 6eddb099b0..0049a2c0b3 100644
> --- a/hw/virtio/vhost.c
> +++ b/hw/virtio/vhost.c
> @@ -70,7 +70,7 @@ static void vhost_dev_sync_region(struct vhost_dev *dev,
>      uint64_t end = MIN(mlast, rlast);
>      vhost_log_chunk_t *from = log + start / VHOST_LOG_CHUNK;
>      vhost_log_chunk_t *to = log + end / VHOST_LOG_CHUNK + 1;
> -    uint64_t addr = (start / VHOST_LOG_CHUNK) * VHOST_LOG_CHUNK;
> +    uint64_t addr = QEMU_ALIGN_DOWN(start, VHOST_LOG_CHUNK);
>  
>      if (end < start) {
>          return;
> -- 
> 2.13.1.395.gf7b71de06



reply via email to

[Prev in Thread] Current Thread [Next in Thread]