All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dennis Zhou <dennis@kernel.org>
To: Baoquan He <bhe@redhat.com>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	akpm@linux-foundation.org, tj@kernel.org, cl@linux.com,
	mawupeng1@huawei.com
Subject: Re: [PATCH 1/3] mm/percpu.c: remove redundant check
Date: Fri, 21 Jul 2023 13:55:12 -0700	[thread overview]
Message-ID: <ZLrwsBbRIil6gm4i@snowbird> (raw)
In-Reply-To: <20230721131800.20003-2-bhe@redhat.com>

On Fri, Jul 21, 2023 at 09:17:58PM +0800, Baoquan He wrote:
> The conditional check "(ai->dyn_size < PERCPU_DYNAMIC_EARLY_SIZE) has
> covered the check '(!ai->dyn_size)'.
> 
> Signed-off-by: Baoquan He <bhe@redhat.com>
> ---
>  mm/percpu.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/mm/percpu.c b/mm/percpu.c
> index 28e07ede46f6..1480bf283d11 100644
> --- a/mm/percpu.c
> +++ b/mm/percpu.c
> @@ -2615,7 +2615,6 @@ void __init pcpu_setup_first_chunk(const struct pcpu_alloc_info *ai,
>  	PCPU_SETUP_BUG_ON(ai->unit_size < PCPU_MIN_UNIT_SIZE);
>  	PCPU_SETUP_BUG_ON(!IS_ALIGNED(ai->unit_size, PCPU_BITMAP_BLOCK_SIZE));
>  	PCPU_SETUP_BUG_ON(ai->dyn_size < PERCPU_DYNAMIC_EARLY_SIZE);
> -	PCPU_SETUP_BUG_ON(!ai->dyn_size);
>  	PCPU_SETUP_BUG_ON(!IS_ALIGNED(ai->reserved_size, PCPU_MIN_ALLOC_SIZE));
>  	PCPU_SETUP_BUG_ON(!(IS_ALIGNED(PCPU_BITMAP_BLOCK_SIZE, PAGE_SIZE) ||
>  			    IS_ALIGNED(PAGE_SIZE, PCPU_BITMAP_BLOCK_SIZE)));
> -- 
> 2.34.1
> 

Acked-by: Dennis Zhou <dennis@kernel.org>

Thanks,
Dennis


  reply	other threads:[~2023-07-21 20:55 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-21 13:17 [PATCH 0/3] percpu: some trivial cleanup patches Baoquan He
2023-07-21 13:17 ` [PATCH 1/3] mm/percpu.c: remove redundant check Baoquan He
2023-07-21 20:55   ` Dennis Zhou [this message]
2023-07-21 13:17 ` [PATCH 2/3] mm/percpu.c: optimize the code in pcpu_setup_first_chunk() a little bit Baoquan He
2023-07-21 21:01   ` Dennis Zhou
2023-07-22  1:14     ` Baoquan He
2023-07-21 13:18 ` [PATCH 3/3] mm/percpu.c: print error message too if atomic alloc failed Baoquan He
2023-07-21 21:03   ` Dennis Zhou
2023-07-22  1:56     ` Baoquan He
2023-07-21 21:04 ` [PATCH 0/3] percpu: some trivial cleanup patches Dennis Zhou
2023-07-22  3:30   ` Baoquan He
2023-07-27 22:50     ` Dennis Zhou
2023-07-28  3:04       ` Baoquan He

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=ZLrwsBbRIil6gm4i@snowbird \
    --to=dennis@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=bhe@redhat.com \
    --cc=cl@linux.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mawupeng1@huawei.com \
    --cc=tj@kernel.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.