From patchwork Mon Jul 9 08:36:48 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 10513911 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 DC9B6600CA for ; Mon, 9 Jul 2018 08:37:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C7AEE28A58 for ; Mon, 9 Jul 2018 08:37:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BBC5C28A59; Mon, 9 Jul 2018 08:37:40 +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=ham 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 8406F28A54 for ; Mon, 9 Jul 2018 08:37:40 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B4E916E3F4; Mon, 9 Jul 2018 08:37:11 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-ed1-x543.google.com (mail-ed1-x543.google.com [IPv6:2a00:1450:4864:20::543]) by gabe.freedesktop.org (Postfix) with ESMTPS id E28AC6E3EE for ; Mon, 9 Jul 2018 08:37:09 +0000 (UTC) Received: by mail-ed1-x543.google.com with SMTP id g12-v6so13258672edi.9 for ; Mon, 09 Jul 2018 01:37:09 -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=dxw7RhKH32bD9BwdC11ASS4OlqJNJtzr01eI+q5TI6I=; b=Qw3Zj4VZiAY1SRpAQH9Q4rxjOqZXO15eNzF7bAeuB49LCfcqE+uolstoLN9sFyvxFC gZsUcYgLqJTdbIkFBuXf2n354nxY8zTlApCV4WHJoEKeBpsJi2hc9/FodJaZvWtAl1SI nLXX34rk6ad/vs0pKEdWtObVtkzwPuI8qTFxGizNou0hidnfYV5MufkRk5XbMQuCyE+b i9wd8Z/b33MSUAZuDAakHEBfd2+on2hLUUTW2zDTIIHTQhHS0v4bgU9Fbv99UwhW0jQ7 XWubQPdVV/8NNhJ4AQ+UCShTpPG9kCM/YdGVLbwAc+SDpeGwxa0B9QlgWZYfWGJNDSMk DgEA== X-Gm-Message-State: APt69E0JBfZJ6tSo2/56cwAwKZJzDORLL7kZAdadJ5tasU1EBl4JyKOK gu4KpvUcwEx/0Id8lnzXjKVw6w== X-Google-Smtp-Source: AAOMgpdKhJPy6E4pM2fGyj8fcKRRtaFsBgT4QS7CFskpjK4dAnKPcK+Fjr1unwIdaHM1bwzq6R3D3A== X-Received: by 2002:a50:9dcb:: with SMTP id l11-v6mr5248265edk.234.1531125428474; Mon, 09 Jul 2018 01:37:08 -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.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Jul 2018 01:37:07 -0700 (PDT) From: Daniel Vetter To: LKML Date: Mon, 9 Jul 2018 10:36:48 +0200 Message-Id: <20180709083650.23549-10-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 10/12] pci: 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: Daniel Vetter , Intel Graphics Development , DRI Development , linux-pci@vger.kernel.org, Bjorn Helgaas , Daniel Vetter 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 compared to the open-coded version. Signed-off-by: Daniel Vetter Cc: Bjorn Helgaas Cc: linux-pci@vger.kernel.org Acked-by: Bjorn Helgaas --- include/linux/pci.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/pci.h b/include/linux/pci.h index 340029b2fb38..1484471ed048 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -601,7 +601,7 @@ static inline bool pci_is_bridge(struct pci_dev *dev) #define for_each_pci_bridge(dev, bus) \ list_for_each_entry(dev, &bus->devices, bus_list) \ - if (!pci_is_bridge(dev)) {} else + for_each_if (pci_is_bridge(dev)) static inline struct pci_dev *pci_upstream_bridge(struct pci_dev *dev) {