linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 06/12] mm: use for_each_if
       [not found] <20180709083650.23549-1-daniel.vetter@ffwll.ch>
@ 2018-07-09  8:36 ` Daniel Vetter
  2018-07-09 18:00   ` Pavel Tatashin
  0 siblings, 1 reply; 2+ messages in thread
From: Daniel Vetter @ 2018-07-09  8:36 UTC (permalink / raw)
  To: LKML
  Cc: DRI Development, Intel Graphics Development, Daniel Vetter,
	Daniel Vetter, Andrew Morton, Michal Hocko, Vlastimil Babka,
	Mel Gorman, David Rientjes, Kemi Wang, Pavel Tatashin,
	Petr Tesarik, YASUAKI ISHIMATSU, Andrey Ryabinin,
	Nikolay Borisov, linux-mm

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH 06/12] mm: use for_each_if
  2018-07-09  8:36 ` [PATCH 06/12] mm: use for_each_if Daniel Vetter
@ 2018-07-09 18:00   ` Pavel Tatashin
  0 siblings, 0 replies; 2+ messages in thread
From: Pavel Tatashin @ 2018-07-09 18:00 UTC (permalink / raw)
  To: daniel.vetter
  Cc: LKML, dri-devel, intel-gfx, daniel.vetter, Andrew Morton,
	Michal Hocko, Vlastimil Babka, mgorman, rientjes, kemi.wang,
	Petr Tesařík, yasu.isimatu, aryabinin, nborisov,
	Linux Memory Management List

LGTM:

Reviewed-by: Pavel Tatashin <pasha.tatashin@oracle.com>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-07-09 18:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20180709083650.23549-1-daniel.vetter@ffwll.ch>
2018-07-09  8:36 ` [PATCH 06/12] mm: use for_each_if Daniel Vetter
2018-07-09 18:00   ` Pavel Tatashin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox