All of lore.kernel.org
 help / color / mirror / Atom feed
From: Juan Quintela <quintela@redhat.com>
To: "Philippe Mathieu-Daudé" <philmd@linaro.org>
Cc: qemu-devel@nongnu.org,  "Dr. David Alan Gilbert" <dgilbert@redhat.com>
Subject: Re: [PATCH v3 1/2] migration: Split ram_bytes_total_common() in two functions
Date: Wed, 08 Feb 2023 15:57:18 +0100	[thread overview]
Message-ID: <87mt5ojjch.fsf@secure.mitica> (raw)
In-Reply-To: <64de90b1-cdb4-2b83-2a56-404afa4681ec@linaro.org> ("Philippe Mathieu-Daudé"'s message of "Wed, 8 Feb 2023 15:54:01 +0100")

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	other threads:[~2023-02-08 14:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-08 14:14 [PATCH v3 0/2] migration: Store ram size value Juan Quintela
2023-02-08 14:14 ` [PATCH v3 1/2] migration: Split ram_bytes_total_common() in two functions Juan Quintela
2023-02-08 14:54   ` Philippe Mathieu-Daudé
2023-02-08 14:57     ` Juan Quintela [this message]
2023-02-08 14:14 ` [PATCH v3 2/2] migration: Calculate ram size once Juan Quintela
2023-02-08 14:54   ` Philippe Mathieu-Daudé

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mt5ojjch.fsf@secure.mitica \
    --to=quintela@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.