qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Xiaoyao Li <xiaoyao.li@intel.com>
To: "Philippe Mathieu-Daudé" <philmd@linaro.org>, qemu-devel@nongnu.org
Cc: qemu-trivial@nongnu.org, David Hildenbrand <david@redhat.com>,
	Igor Mammedov <imammedo@redhat.com>
Subject: Re: [PATCH] backends/hostmem: Fix block comments style (checkpatch.pl warnings)
Date: Tue, 30 Jan 2024 15:14:07 +0800	[thread overview]
Message-ID: <bf98c2d0-297c-443d-8339-30d24dda109e@intel.com> (raw)
In-Reply-To: <20240129183130.97447-1-philmd@linaro.org>

On 1/30/2024 2:31 AM, Philippe Mathieu-Daudé wrote:
> While re-indenting code in host_memory_backend_memory_complete(),
> we triggered various "Block comments use a leading /* on a separate
> line" warnings from checkpatch.pl. Correct the comments style.
> 
> Fixes: e199f7ad4d ("backends: Simplify host_memory_backend_memory_complete()")
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>

Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com>

> ---
>   backends/hostmem.c | 12 ++++++++----
>   1 file changed, 8 insertions(+), 4 deletions(-)
> 
> diff --git a/backends/hostmem.c b/backends/hostmem.c
> index 30f69b2cb5..987f6f591e 100644
> --- a/backends/hostmem.c
> +++ b/backends/hostmem.c
> @@ -344,9 +344,11 @@ host_memory_backend_memory_complete(UserCreatable *uc, Error **errp)
>       unsigned long lastbit = find_last_bit(backend->host_nodes, MAX_NODES);
>       /* lastbit == MAX_NODES means maxnode = 0 */
>       unsigned long maxnode = (lastbit + 1) % (MAX_NODES + 1);
> -    /* ensure policy won't be ignored in case memory is preallocated
> +    /*
> +     * Ensure policy won't be ignored in case memory is preallocated
>        * before mbind(). note: MPOL_MF_STRICT is ignored on hugepages so
> -     * this doesn't catch hugepage case. */
> +     * this doesn't catch hugepage case.
> +     */
>       unsigned flags = MPOL_MF_STRICT | MPOL_MF_MOVE;
>       int mode = backend->policy;
>   
> @@ -363,7 +365,8 @@ host_memory_backend_memory_complete(UserCreatable *uc, Error **errp)
>           return;
>       }
>   
> -    /* We can have up to MAX_NODES nodes, but we need to pass maxnode+1
> +    /*
> +     * We can have up to MAX_NODES nodes, but we need to pass maxnode+1
>        * as argument to mbind() due to an old Linux bug (feature?) which
>        * cuts off the last specified node. This means backend->host_nodes
>        * must have MAX_NODES+1 bits available.
> @@ -391,7 +394,8 @@ host_memory_backend_memory_complete(UserCreatable *uc, Error **errp)
>           }
>       }
>   #endif
> -    /* Preallocate memory after the NUMA policy has been instantiated.
> +    /*
> +     * Preallocate memory after the NUMA policy has been instantiated.
>        * This is necessary to guarantee memory is allocated with
>        * specified NUMA policy in place.
>        */



      reply	other threads:[~2024-01-30  7:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-29 18:31 [PATCH] backends/hostmem: Fix block comments style (checkpatch.pl warnings) Philippe Mathieu-Daudé
2024-01-30  7:14 ` Xiaoyao Li [this message]

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=bf98c2d0-297c-443d-8339-30d24dda109e@intel.com \
    --to=xiaoyao.li@intel.com \
    --cc=david@redhat.com \
    --cc=imammedo@redhat.com \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).