Skip to content

Commit

Permalink
vhost: use QEMU_ALIGN_DOWN
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Reviewed-by: Richard Henderson <[email protected]>
  • Loading branch information
elmarco committed Aug 31, 2017
1 parent cf7a09c commit 33c5793
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hw/virtio/vhost.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 33c5793

Please sign in to comment.