[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <f67df96a-206b-40ca-8d28-42715c907f64@gmail.com>
Date: Tue, 20 Aug 2024 18:06:39 +0800
From: Alex Shi <seakeel@...il.com>
To: Andrew Morton <akpm@...ux-foundation.org>, alexs@...nel.org
Cc: open list <linux-kernel@...r.kernel.org>, linux-mm@...ck.org
Subject: Re: [PATCH v2] mm: skip less than check for MAX_NR_ZONES
On 8/20/24 12:40 PM, Andrew Morton wrote:
> On Mon, 19 Aug 2024 19:26:28 +0800 alexs@...nel.org wrote:
>
>> From: Alex Shi <alexs@...nel.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!
Powered by blists - more mailing lists