mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 02:30:34 +02:00 
			
		
		
		
	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 <mateusznosek0@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Reviewed-by: Andrew Morton <akpm@linux-foundation.org> Reviewed-by: Wei Yang <richard.weiyang@gmail.com> Link: http://lkml.kernel.org/r/20200228224617.11343-1-mateusznosek0@gmail.com Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
		
							parent
							
								
									552657b7b3
								
							
						
					
					
						commit
						e46b893dd1
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
					@ -37,7 +37,7 @@ void __init mminit_verify_zonelist(void)
 | 
				
			||||||
		struct zonelist *zonelist;
 | 
							struct zonelist *zonelist;
 | 
				
			||||||
		int i, listid, zoneid;
 | 
							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++) {
 | 
							for (i = 0; i < MAX_ZONELISTS * MAX_NR_ZONES; i++) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			/* Identify the zone and nodelist */
 | 
								/* Identify the zone and nodelist */
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue