From: Wei Yang <richard.weiyang@gmail.com>
To: mateusznosek0@gmail.com
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
akpm@linux-foundation.org
Subject: Re: [PATCH] mm/mm_init.c: Clean code. Use BUILD_BUG_ON when comparing compile time constant
Date: Mon, 2 Mar 2020 13:51:37 +0000 [thread overview]
Message-ID: <20200302135137.lm5syk7r2thohs54@master> (raw)
In-Reply-To: <20200228224617.11343-1-mateusznosek0@gmail.com>
On Fri, Feb 28, 2020 at 11:46:17PM +0100, mateusznosek0@gmail.com wrote:
>From: Mateusz Nosek <mateusznosek0@gmail.com>
>
>MAX_ZONELISTS is compile time constant,
>so it should be compared using BUILD_BUG_ON not BUG_ON.
>
>Signed-off-by: Mateusz Nosek <mateusznosek0@gmail.com>
Sounds you are right.
Reviewed-by: Wei Yang <richard.weiyang@gmail.com>
>---
> mm/mm_init.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/mm/mm_init.c b/mm/mm_init.c
>index 5c918388de99..7da6991d9435 100644
>--- a/mm/mm_init.c
>+++ b/mm/mm_init.c
>@@ -37,7 +37,7 @@ void __init mminit_verify_zonelist(void)
> struct zonelist *zonelist;
> int i, listid, zoneid;
>
>- BUG_ON(MAX_ZONELISTS > 2);
>+ BUILD_BUG_ON(MAX_ZONELISTS > 2);
> for (i = 0; i < MAX_ZONELISTS * MAX_NR_ZONES; i++) {
>
> /* Identify the zone and nodelist */
>--
>2.17.1
--
Wei Yang
Help you, Help me
prev parent reply other threads:[~2020-03-02 13:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-28 22:46 [PATCH] mm/mm_init.c: Clean code. Use BUILD_BUG_ON when comparing compile time constant mateusznosek0
2020-03-02 13:51 ` Wei Yang [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=20200302135137.lm5syk7r2thohs54@master \
--to=richard.weiyang@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mateusznosek0@gmail.com \
/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).