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

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


  reply	other threads:[~2023-07-21 13:19 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 ` Baoquan He [this message]
2023-07-21 20:55   ` [PATCH 1/3] mm/percpu.c: remove redundant check Dennis Zhou
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=20230721131800.20003-2-bhe@redhat.com \
    --to=bhe@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=cl@linux.com \
    --cc=dennis@kernel.org \
    --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.