On Fri, 6 Feb 2026 at 13:33, Sergei Heifetz <[email protected]> wrote:
>
>
>
> According to coding style (docs/devel/style.rst):
>
> Mixed declarations (interleaving statements and declarations within
> blocks) are generally not allowed.
>
>
> newsize = TARGET_PAGE_ALIGN(newsize);
> newsize = REAL_HOST_PAGE_ALIGN(newsize);
>
>
>
> Hello, Laurent. Please note that I didn't touch these lines.
Laurent's comment is not about those two lines, but about
the ones above, that you don't quote in your reply. (Laurent
is following the usual mailing list style of interleaved commentary,
so his remark follows the part of your email that it is in
response to.)
> @@ -2054,11 +2054,11 @@ static int memory_try_enable_merging(void *addr,
> size_t len)
> */
> int qemu_ram_resize(RAMBlock *block, ram_addr_t newsize, Error **errp)
> {
> + assert(block);
> +
> const ram_addr_t oldsize = block->used_length;
> const ram_addr_t unaligned_size = newsize;
>
> - assert(block);
> -
You've moved a code line (the assert) above the declaration lines, so
the function used to follow this coding style rule, but now it doesn't.
thanks
-- PMM