qemu-trivial
[Top][All Lists]
Advanced

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

Re: [Qemu-trivial] [Qemu-devel] [PATCH v5 10/46] hw/smbios: Use the IEC


From: Richard Henderson
Subject: Re: [Qemu-trivial] [Qemu-devel] [PATCH v5 10/46] hw/smbios: Use the IEC binary prefix definitions
Date: Tue, 26 Jun 2018 23:09:22 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0

On 06/25/2018 05:42 AM, Philippe Mathieu-Daudé wrote:
> It eases code review, unit is explicit.
> 
> Patch generated using:
> 
>   $ git grep -E '(1024|2048|4096|8192|(<<|>>).?(10|20|30))' hw/ include/hw/
> 
> and modified manually.
> 
> Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
> ---
>  hw/smbios/smbios.c | 15 ++++++---------
>  1 file changed, 6 insertions(+), 9 deletions(-)


Reviewed-by: Richard Henderson <address@hidden>

> @@ -640,7 +637,7 @@ static void smbios_build_type_16_table(unsigned dimm_cnt)
>      t->location = 0x01; /* Other */
>      t->use = 0x03; /* System memory */
>      t->error_correction = 0x06; /* Multi-bit ECC (for Microsoft, per 
> SeaBIOS) */
> -    size_kb = QEMU_ALIGN_UP(ram_size, ONE_KB) / ONE_KB;
> +    size_kb = QEMU_ALIGN_UP(ram_size, KiB) / KiB;

Perhaps for a different patch set, but DIV_ROUND_UP.


r~



reply via email to

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