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: 10513883 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 412F5603D7 for ; Mon, 9 Jul 2018 08:37:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2C00A22362 for ; Mon, 9 Jul 2018 08:37:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1D5E825D99; Mon, 9 Jul 2018 08:37:09 +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=-3.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EB02A27816 for ; Mon, 9 Jul 2018 08:37:06 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id ECB9F6B0283; Mon, 9 Jul 2018 04:37:05 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id E7A776B0284; Mon, 9 Jul 2018 04:37:05 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D69CD6B0285; Mon, 9 Jul 2018 04:37:05 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) by kanga.kvack.org (Postfix) with ESMTP id 76FC96B0283 for ; Mon, 9 Jul 2018 04:37:05 -0400 (EDT) Received: by mail-ed1-f72.google.com with SMTP id x21-v6so2914874eds.2 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:dkim-signature:from:to:cc:subject:date :message-id:in-reply-to:references; bh=sMZSSU0KkKE9HYRn/+VuCD6ALLRw+y1IXpSf0Z83IAA=; b=lurdN3c2vV6E6x2asUpQRPmEr00Cv+ZAmOxus+bpPaFhkdWFZ8zHOPbmAnzY9lOaWT ta1X8J/I6QGWBr3jZnco9qGAZkQKcbdChJna5pqBmNzifQa1q7QsOS76sG1od9QEbdle GG+GCEebPVrHg01yfehVkIzYqW6OQuMSyyGCRh+dwpaQ9ltCTq+xa3PCIuaH8BKHZnrD yhUYd4+QCC/dqU6PqelKaoaUARfED7gCRkS+WAxLJHsAVahGBmzl6IAnt/KXl+oFzvrJ LhdgSnlvY4t3BiivIFxbvEOxJ4T73S2ExXjo+W4RkMV0e+w0BPhSk9IRoOqvVRwNR3GG TrKQ== X-Gm-Message-State: APt69E2Qj86/A8pWOckW/zlV8lZccFWjQWo6elQysO3l6/2ssWpeE49V qs11qr0ILXkj0GtGz92QXDgFC36/RdKj60hklrsZfsR2Y6771w8eJIMdJ0If4wh0/oCr2xh4c1W +C4lkSGvK19TM5Kyy9/el7w17Nghxic+UliH9xQwpjKJpX1ecWad3LzXKIWB9bBBpNf0vbkVXd9 oy5JWijhwCSkxLxjUvOZPsTPxo1iuTM1r5S8ZfPB74PUguxWA5RRRjQuP/VPU8ad8/EF1eVS23Q BSjIF53gNBt80o6bciwv3hUNPF3sqFyb8lG022AbaOwbLaK1lncTPwQrHhuQPj1sO/eWe8Rs49e ygr6TDVFh/FZUOei2rpf1qHg9cBdEavc9O+KLcwpkmcKvK3pPlBnGCJVZj28CSyCo8ZXLfKlI9r 9 X-Received: by 2002:aa7:d60d:: with SMTP id c13-v6mr18949570edr.301.1531125424984; Mon, 09 Jul 2018 01:37:04 -0700 (PDT) X-Received: by 2002:aa7:d60d:: with SMTP id c13-v6mr18949522edr.301.1531125424127; Mon, 09 Jul 2018 01:37:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531125424; cv=none; d=google.com; s=arc-20160816; b=fjpejvTVW9L4g5d6/2PB1h5KAdoFFUhMxlWQnmdkbvZfb0/HlrtQ/c3ky/LKwRboon K3s7LGnbnWilu6/j4N/ixYqf2WD03lh+KkurZxO2nUTS2a3c0sXaY7uWB1q9aEpv3mas F5B+0z632qO3nM6JeXYjN0AYS7/rq47vezyXBcR49NXJ6Ds2PLTSL1fHSY63lFulHw/l uwM7YI9w9zVMFmLuQxmYTf9r1a5tvtuVO/YtDB0tnL/UPOYk3mqVIUsUNDsse7GdrxD2 DzjwWq4pXTLEynW7babpU6kuACmbee+tfsHRX/1dT3p89hhhZHybZ4dHAWtFoTudCaWq vqjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=sMZSSU0KkKE9HYRn/+VuCD6ALLRw+y1IXpSf0Z83IAA=; b=Y9N6y7hkUagqRDFx9OYQWTk4hqfS5N4nh728o+sifRwpJI+pSn19jTiVrL91qSrD1e XRM7ilU3kAzdCXgE8UV8RISLCM70cHFYZ7seB2LZjS1ajYSrCRx1wLW2m9V5/fOCWC4x qyj7AE+x25nD5Jp3ckwocV4KettYPkSsd/RdLDdfNt+rvpO+XhzhRQUiCJ/88nEeY0DE FRiZqslDhLfwBWVX50jO8pR7n099xbJZ9oI+8jqYxA0AhSFJjqvHPxO0k6I0u4iFdrHN NQPXgH02vY+tYurGxN8IqwLGnutOkhym+DmCkd9O5ADJZIGrtIrnTA6ebnW5oSX/4FoF QspQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ffwll.ch header.s=google header.b=LGk3+re6; spf=neutral (google.com: 209.85.220.65 is neither permitted nor denied by best guess record for domain of daniel.vetter@ffwll.ch) smtp.mailfrom=daniel.vetter@ffwll.ch Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id s12-v6sor4091774eds.38.2018.07.09.01.37.03 for (Google Transport Security); Mon, 09 Jul 2018 01:37:04 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.65 is neither permitted nor denied by best guess record for domain of daniel.vetter@ffwll.ch) client-ip=209.85.220.65; Authentication-Results: mx.google.com; dkim=pass header.i=@ffwll.ch header.s=google header.b=LGk3+re6; spf=neutral (google.com: 209.85.220.65 is neither permitted nor denied by best guess record for domain of daniel.vetter@ffwll.ch) smtp.mailfrom=daniel.vetter@ffwll.ch DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=sMZSSU0KkKE9HYRn/+VuCD6ALLRw+y1IXpSf0Z83IAA=; b=LGk3+re6bBXpTOEwBTRgtKd21D7FYwlGzo7XI6fwPgKSgao/CcncC3qHh334aw/TWi hr299WAO338qLhG0lWfrg7rikXFypSUELoUF2AP/w9EQ+MF2cMv/nwmueFHlqYBmUGgu Oqdp9T9ca+KtMB922L2qOJlKl+lWDD5MpOIjI= 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 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@kvack.org Subject: [PATCH 06/12] mm: use for_each_if 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> X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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) {