[Intel-gfx] [PATCH 06/12] mm: use for_each_if

Daniel Vetter daniel.vetter at ffwll.ch
Mon Jul 9 08:36:44 UTC 2018


Avoids the inverted condition of the open-coded version.

Signed-off-by: Daniel Vetter <daniel.vetter at intel.com>
Cc: Andrew Morton <akpm at linux-foundation.org>
Cc: Michal Hocko <mhocko at suse.com>
Cc: Vlastimil Babka <vbabka at suse.cz>
Cc: Mel Gorman <mgorman at techsingularity.net>
Cc: David Rientjes <rientjes at google.com>
Cc: Kemi Wang <kemi.wang at intel.com>
Cc: Pavel Tatashin <pasha.tatashin at oracle.com>
Cc: Petr Tesarik <ptesarik at suse.com>
Cc: YASUAKI ISHIMATSU <yasu.isimatu at gmail.com>
Cc: Andrey Ryabinin <aryabinin at virtuozzo.com>
Cc: Nikolay Borisov <nborisov at suse.com>
Cc: linux-mm at kvack.org
---
 include/linux/mmzone.h | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index 32699b2dc52a..1bd5f4c72c8b 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -940,9 +940,7 @@ extern struct zone *next_zone(struct zone *zone);
 	for (zone = (first_online_pgdat())->node_zones; \
 	     zone;					\
 	     zone = next_zone(zone))			\
-		if (!populated_zone(zone))		\
-			; /* do nothing */		\
-		else
+		for_each_if (populated_zone(zone))
 
 static inline struct zone *zonelist_zone(struct zoneref *zoneref)
 {
-- 
2.18.0



More information about the Intel-gfx mailing list