aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMateusz Nosek <[email protected]>2020-04-06 20:08:36 -0700
committerLinus Torvalds <[email protected]>2020-04-07 10:43:41 -0700
commite46b893dd113253c2ff032aed22d9df404c5511d (patch)
treeaab3073e958861cf12e3e8ee3b030f4511d20135
parent552657b7b3343851916fde7e4fd6bfb6516d2bcb (diff)
mm/mm_init.c: clean code. Use BUILD_BUG_ON when comparing compile time constant
MAX_ZONELISTS is a compile time constant, so it should be compared using BUILD_BUG_ON not BUG_ON. Signed-off-by: Mateusz Nosek <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Reviewed-by: Andrew Morton <[email protected]> Reviewed-by: Wei Yang <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r--mm/mm_init.c2
1 files changed, 1 insertions, 1 deletions
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 */