From patchwork Mon Jul 9 08:36:44 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 10513903 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 6C1DD600CA for ; Mon, 9 Jul 2018 08:37:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5406D28A54 for ; Mon, 9 Jul 2018 08:37:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4831D28A59; Mon, 9 Jul 2018 08:37:35 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 0897628A54 for ; Mon, 9 Jul 2018 08:37:35 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id AABB16E3EA; Mon, 9 Jul 2018 08:37:09 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-ed1-x541.google.com (mail-ed1-x541.google.com [IPv6:2a00:1450:4864:20::541]) by gabe.freedesktop.org (Postfix) with ESMTPS id 27C486E3DE for ; Mon, 9 Jul 2018 08:37:05 +0000 (UTC) Received: by mail-ed1-x541.google.com with SMTP id e19-v6so13258760edq.7 for ; Mon, 09 Jul 2018 01:37:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=sMZSSU0KkKE9HYRn/+VuCD6ALLRw+y1IXpSf0Z83IAA=; b=FUB1nw8WUKcQXR66bsRUWT6ULyviVkVROFJb0pCzBkImjcYrrgUZapmOzx+7X9N5oq pwlv67ZjZqibU138d5XHtBag00vpg2rgWoidgfrouQvzKgeA+OvWCuNHoTH9/+qyuhnA xA6Z7dwwy5f8PlyuRAfpal7lY1jzqXzO/VBqA8ULq7ohF3DoxQjxWwSiDXRnrzbATR7T qQ0FPfAoJs/V1TgcD5RhSaTOOgEWQ2Lw+O8rvNSRSQr81LFGjwLXaS2wIsxVmVXSNn8z aX/Wg1+uTPVzVl+ZNezagBnfVYePyCIRl55XVEHkf2kA9rr/gbbD/XV+pO5P/ez63PBa RDNg== X-Gm-Message-State: APt69E15tiaWiyofoD+UDfLHPETrslgjuHIO1dFDn04SBu1AC2Jb6fbm LEFAM5rWqPg2zZ+jgJn8ZNFQ/A== X-Google-Smtp-Source: AAOMgpd9G6bm/5T0735aeEHe9fA8gQFlnb+wg42CW0ej5HQdtsZDQxsuKEqI5X/cfU6kehTEfWRxxg== X-Received: by 2002:a50:ec0b:: with SMTP id g11-v6mr17789502edr.38.1531125423865; Mon, 09 Jul 2018 01:37:03 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:5628:0:496f:7dc5:66d7:a057]) by smtp.gmail.com with ESMTPSA id 8-v6sm340067edv.77.2018.07.09.01.37.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Jul 2018 01:37:03 -0700 (PDT) From: Daniel Vetter To: LKML Date: Mon, 9 Jul 2018 10:36:44 +0200 Message-Id: <20180709083650.23549-6-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180709083650.23549-1-daniel.vetter@ffwll.ch> References: <20180709083650.23549-1-daniel.vetter@ffwll.ch> Subject: [Intel-gfx] [PATCH 06/12] mm: use for_each_if X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michal Hocko , Petr Tesarik , Nikolay Borisov , Daniel Vetter , Intel Graphics Development , Kemi Wang , Pavel Tatashin , DRI Development , YASUAKI ISHIMATSU , linux-mm@kvack.org, Andrey Ryabinin , David Rientjes , Daniel Vetter , Andrew Morton , Mel Gorman , Vlastimil Babka MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP Avoids the inverted condition of the open-coded version. Signed-off-by: Daniel Vetter Cc: Andrew Morton Cc: Michal Hocko Cc: Vlastimil Babka Cc: Mel Gorman Cc: David Rientjes Cc: Kemi Wang Cc: Pavel Tatashin Cc: Petr Tesarik Cc: YASUAKI ISHIMATSU Cc: Andrey Ryabinin Cc: Nikolay Borisov Cc: linux-mm@kvack.org Reviewed-by: Pavel Tatashin --- 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) {