qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v3 1/2] migration: Split ram_bytes_total_common() in two func


From: Juan Quintela
Subject: Re: [PATCH v3 1/2] migration: Split ram_bytes_total_common() in two functions
Date: Wed, 08 Feb 2023 15:57:18 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)

Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
> On 8/2/23 15:14, Juan Quintela wrote:
>> It is just a big if in the middle of the function, and we need two
>> functions anways.
>
> Typo "anyways".
>
>> Signed-off-by: Juan Quintela <quintela@redhat.com>
>> ---
>>   migration/ram.c | 25 ++++++++++++++-----------
>>   1 file changed, 14 insertions(+), 11 deletions(-)
>> @@ -3222,7 +3224,8 @@ static int ram_save_setup(QEMUFile *f, void *opaque)
>>       (*rsp)->pss[RAM_CHANNEL_PRECOPY].pss_channel = f;
>>         WITH_RCU_READ_LOCK_GUARD() {
>> -        qemu_put_be64(f, ram_bytes_total_common(true) | 
>> RAM_SAVE_FLAG_MEM_SIZE);
>> +        qemu_put_be64(f, ram_bytes_total_with_ignored()
>> +                      | RAM_SAVE_FLAG_MEM_SIZE);
>
> Per CODING_STYLE the '|' should go under ram_bytes_total_with_ignored ;)

I thought so.  But emacs autoindent put it there.  And as proud follower
of the Emacs cult, emacs is never wrong O:-)

>            qemu_put_be64(f, ram_bytes_total_with_ignored()
>                             | RAM_SAVE_FLAG_MEM_SIZE);
>
>>           RAMBLOCK_FOREACH_MIGRATABLE(block) {
>>               qemu_put_byte(f, strlen(block->idstr));

I would have to see what I need to change in the indentation code to
make this correct.

BTW, nice catch.

Later, Juan.




reply via email to

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