linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Alex Shi <seakeel@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>, alexs@kernel.org
Cc: open list <linux-kernel@vger.kernel.org>, linux-mm@kvack.org
Subject: Re: [PATCH v2] mm: skip less than check for MAX_NR_ZONES
Date: Tue, 20 Aug 2024 18:06:39 +0800	[thread overview]
Message-ID: <f67df96a-206b-40ca-8d28-42715c907f64@gmail.com> (raw)
In-Reply-To: <20240819214055.978b33eae88004d35b9ce634@linux-foundation.org>



On 8/20/24 12:40 PM, Andrew Morton wrote:
> On Mon, 19 Aug 2024 19:26:28 +0800 alexs@kernel.org wrote:
> 
>> From: Alex Shi <alexs@kernel.org>
>>
>> Remove unnecessary '<' check for ZONES_SHIFT assignment.
>>
>> ...
>>
>> --- a/include/linux/page-flags-layout.h
>> +++ b/include/linux/page-flags-layout.h
>> @@ -14,7 +14,7 @@
>>   */
>>  #if MAX_NR_ZONES < 2
>>  #define ZONES_SHIFT 0
>> -#elif MAX_NR_ZONES <= 2
>> +#elif MAX_NR_ZONES == 2
>>  #define ZONES_SHIFT 1
>>  #elif MAX_NR_ZONES <= 4
>>  #define ZONES_SHIFT 2
> 
> mmm, why.  I think it looks more logical (and certainly more
> consistent) the way things are now.
> 

Uh, then let's keep the current code if the logical looks better.

In fact, the logical is in preprocess, has nothing change in the final object file.

Thanks for comments!
 


      reply	other threads:[~2024-08-20 10:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-19 11:26 alexs
2024-08-20  4:40 ` Andrew Morton
2024-08-20 10:06   ` Alex Shi [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=f67df96a-206b-40ca-8d28-42715c907f64@gmail.com \
    --to=seakeel@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=alexs@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.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