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: 10514031 X-Patchwork-Delegate: bhelgaas@google.com 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 5C0B2603D7 for ; Mon, 9 Jul 2018 08:42:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 48C6E288E5 for ; Mon, 9 Jul 2018 08:42:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3D34628A5B; Mon, 9 Jul 2018 08:42:22 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DF3B7288E5 for ; Mon, 9 Jul 2018 08:42:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932821AbeGIIlz (ORCPT ); Mon, 9 Jul 2018 04:41:55 -0400 Received: from mail-ed1-f68.google.com ([209.85.208.68]:46099 "EHLO mail-ed1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754576AbeGIIhJ (ORCPT ); Mon, 9 Jul 2018 04:37:09 -0400 Received: by mail-ed1-f68.google.com with SMTP id r17-v6so13261950edo.13 for ; Mon, 09 Jul 2018 01:37:09 -0700 (PDT) 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=dxw7RhKH32bD9BwdC11ASS4OlqJNJtzr01eI+q5TI6I=; b=SMLgLTTu5+hQr6yOhjlEqAE/Kw3hUCs+f2+3Sl9kkce73Ohe0sloq2FIh8TnyqP73T /13/ZZYMl+ayfPOWpjb7IxeNUAoj+gUuzbYsQEev7skz6vgEVXFFblmwmReuVMIxxtqf uEfVHbBknjf2jVorbuYc6FZkEwC9dKdNR6hy4= 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=X/AvTE//diNMUpIrK0JuIDr1BJ1X0MUvOdAOdgECnuCARzkIQXAx7YCwMSkxwH4g7M M7v8LfDmgwThJ34XRCsPdGHcurTU8ZPI6akdJGyjKjawBSHVtCgWR3vRXzbgq+AN6ko7 gpxYwmb4PVuojaWWos+ZwK4Y60ZcTk6YXmuy+NujkyshO1xnSLS0vATqi3Sd8RGKQpFc /FoctZ1CwRD6OTdkvopPXu9yZn5tlxvHA65GMRIS6H156XCbNUPx7tbUf/B3tP5i0EGP /7YYko5hmMypqCSAc+stDLzS2Bz1gbmTVqUpz5EcRz8NrhZNSS9LwQ2BnkxYCg9cVm8q L5bg== X-Gm-Message-State: APt69E22nr87EoMh7/H3cBxinemPRlGc6RWXi/w7kjc8uuhZ0v1ht8+r yITNsJdlopWXJbWhHkQ7SWEYMSrb 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 Cc: DRI Development , Intel Graphics Development , Daniel Vetter , Daniel Vetter , Bjorn Helgaas , linux-pci@vger.kernel.org Subject: [PATCH 10/12] pci: use for_each_if 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> Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org 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) {