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: 10513925 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 76C2E600CA for ; Mon, 9 Jul 2018 08:38:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5EF1A28A5A for ; Mon, 9 Jul 2018 08:38:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5377228A5B; Mon, 9 Jul 2018 08:38:00 +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 6533C28A5A for ; Mon, 9 Jul 2018 08:37:59 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0BE5B6E3FC; Mon, 9 Jul 2018 08:37:14 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@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 E038C6E3EB for ; Mon, 9 Jul 2018 08:37:09 +0000 (UTC) Received: by mail-ed1-x541.google.com with SMTP id b10-v6so13259164edi.2 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=duKvtWBP+SI64Nkqr7YpIZOS3v9aRseVfy0aVGM4sa8dlLqeIiOZ2oK/wfW+k1vasT XglmCC/hX0TxmfhpO4VjcQdHTePxf8g+X7SOl5KqIPaLGeg6XmHCdOsCNM6VLaxanV4q d4fGQF1izHMjOfYafuLmuLdpoOnfub024hShr5dVl2F43mPFOEpU+SSYSIPvB4OSlAxI nlYJP3XeVsmL4xNOVQa+WEtksQRR933oJB5eyRDehcrXSQp281TjKrHaCCQgknrur8oT 0zITo96AW7v7vA/7lkCSfx9dD9wWMTS9uNtU9tYh2MZBEShvB9P54ReBrHqHE481eFml lGng== X-Gm-Message-State: APt69E33KKL9+V/v1cIF7QVfo3t1T/zGGqisXaFL/q1WRmSSrtRsH2gT EvZvTy5HzlwB5HIsRZpyBXMz6A== 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 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> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - 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: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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) {