qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] cleanup of ROUND_UP-like lines


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH] cleanup of ROUND_UP-like lines
Date: Thu, 26 Jun 2014 10:55:33 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0

On 06/26/2014 12:13 AM, Hu Tao wrote:
> We already have ROUND_UP but there are similar macros and ROUND_UP-like
> lines all around, replace them with ROUND_UP and clean up similar macros.
> 
> Signed-off-by: Hu Tao <address@hidden>
> ---

All of these conversions are correct, so:
Reviewed-by: Eric Blake <address@hidden>

However, without documenting how you found what to convert, I'm quite
sure you missed some conversions.  In fact, I found at least:

util/oslib-win32.c:    memory = (memory + pagesize - 1) & -pagesize;

tcg/ppc/tcg-target.c-#define FRAME_SIZE ((TCG_TARGET_CALL_STACK_OFFSET   \
tcg/ppc/tcg-target.c-                     + TCG_STATIC_CALL_ARGS_SIZE    \
tcg/ppc/tcg-target.c-                     + CPU_TEMP_BUF_SIZE            \
tcg/ppc/tcg-target.c-                     + REG_SAVE_SIZE                \
tcg/ppc/tcg-target.c-                     + TCG_TARGET_STACK_ALIGN - 1)  \
tcg/ppc/tcg-target.c:                    & -TCG_TARGET_STACK_ALIGN)

block/cow.c:    s->cow_sectors_offset = (bitmap_size + 511) & ~511;

block/qcow.c:    header_size = (header_size + 7) & ~7;

before I quit looking for more.  (I just manually read through
 git grep '[^&]& [~-]'
which has a lot of noise for non-rounding uses, but definitely found
some missed cases)

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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