mm: skip less than check for MAX_NR_ZONES
Subsystems (2)
PATCH v2 1/1 mm: skip less than check for MAX_NR_ZONES
From: Alex Shi <[email protected]>
Remove unnecessary '<' check for ZONES_SHIFT assignment.
--- include/linux/page-flags-layout.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/page-flags-layout.h +1 -1
@@ -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
Signature · 1 line
2.43.0
Andrew Morton
maintainerQuoted 9 lines · On Mon, 19 Aug 2024 19:26:28 +0800 [email protected] wrote:
From: Alex Shi <[email protected]>
Remove unnecessary '<' check for
ZONES_SHIFTassignment....
include/linux/page-flags-layout.h line 20
Quoted 8 lines
include/linux/page-flags-layout.h +1
-1@@ -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.
Quoted 8 lines · Andrew Morton
Quoted 6 lines · On Mon, 19 Aug 2024 19:26:28 +0800 [email protected] wrote:
From: Alex Shi <[email protected]>
Remove unnecessary '<' check for
ZONES_SHIFTassignment....
Quoted 15 lines
include/linux/page-flags-layout.h line 20
Quoted 11 lines
include/linux/page-flags-layout.h +1
-1@@ -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 2mmm, 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!