lkml.org 
[lkml]   [2018]   [Jul]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 06/12] mm: use for_each_if
Date
Avoids the inverted condition of the open-coded version.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Mel Gorman <mgorman@techsingularity.net>
Cc: David Rientjes <rientjes@google.com>
Cc: Kemi Wang <kemi.wang@intel.com>
Cc: Pavel Tatashin <pasha.tatashin@oracle.com>
Cc: Petr Tesarik <ptesarik@suse.com>
Cc: YASUAKI ISHIMATSU <yasu.isimatu@gmail.com>
Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>
Cc: Nikolay Borisov <nborisov@suse.com>
Cc: linux-mm@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
\
 
 \ /
  Last update: 2018-07-09 10:43    [W:0.066 / U:22.936 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site