Message ID | a7980450-4ae2-9a18-4068-7463fb0190bd@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 99BA713B5 for <patchwork-linux-arm@patchwork.kernel.org>; Wed, 24 Apr 2019 19:17:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 87D3028BBF for <patchwork-linux-arm@patchwork.kernel.org>; Wed, 24 Apr 2019 19:17:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8581228BC9; Wed, 24 Apr 2019 19:17:51 +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,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 3B65028BBF for <patchwork-linux-arm@patchwork.kernel.org>; Wed, 24 Apr 2019 19:17:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date: Message-ID:References:To:From:Subject:Reply-To:Content-ID:Content-Description :Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Kv9ZrTunbrmo+60p17nNNDIdhH0zRCClmLUjvWCBZE0=; b=EUPTr1MMctCNsP Acqkf8UiIYUfq5hO3CnoqouNmjVnYDwxBE3xM4El5Ribpv/JO9dX2J/78DS/efdF+cFZeHaH5f/57 ctJwovRR04ellUcQml6RLJefSXyGPZMlRHUGRsBSelfDlY16zuv55TqcPjLqwmguSv9RC+laHgs51 DTiwnCwjI5qiLga6rzPZybql9kS6+SbnMW5njiFhhYp8VISQrUI6SNP4HxyKYXVYfB7HXorgiWkVL a4bBPTUpysBH4COmexwOLZbI0Alik4JkpiR0p+6gR64WT0QFalBoM82pddFH59LtDG3exjWEirQZL xu8XZQC6ec+2cRr8wQBw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hJNOp-0002X3-B6; Wed, 24 Apr 2019 19:17:43 +0000 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hJNOm-0002Wa-Gl for linux-arm-kernel@lists.infradead.org; Wed, 24 Apr 2019 19:17:41 +0000 Received: by mail-wm1-x342.google.com with SMTP id v14so6656925wmf.2 for <linux-arm-kernel@lists.infradead.org>; Wed, 24 Apr 2019 12:17:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:from:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=vWfV/uLxHlKTCY8jgaOm/hsQsubaADZJKJWfjxs7Npo=; b=q/vVbZY/oSONQZN13xcosLByqm2O1DfMuokvB/Zs2CWi9b5hGXmvyq5jC9E3clmH+l mIkrlnMdfjyZvxDJ7sKt77zegqGhpIuSqQ+loZavowwQos0CAq4G8VuC2WsyZSU4w9eS FEpVZEGh+2MtbxAPoEBXG807GvXT+LbvdPixqZwaMbJnTUMyKK9cG9RgV7pugAkrGx0+ VlDqc1JKTGsHMFI/rNNYUesCgEfddgmbZ68Cmkgj3BJX0xcTRbEbCbMwco6Yc1n7sbDy tm3SLEuQ1Aojh+7gfxXY3GPDcxlsHmodwHLzy1agZwERBblJjhvLLUlBgvN1AxNgjjzB +NYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=vWfV/uLxHlKTCY8jgaOm/hsQsubaADZJKJWfjxs7Npo=; b=Igg8M1uKQ7ROeSMO4VoxTgDhrkF20bqQN4e5nZARkZce+RhSF4f2L7wvQYZ5vUiuNA SJP1eq4pMdHm4sn+U2YvhlAP/u+/fpKPrDiZO8VgXCXNhA303YPcerkAhJzxwS4eKdDM 6O/xlyJHQ4gMMGn7LguTvKnsT7gwTH58L3yIRJD9fFh6eufloqAWkLAr6FU1VTO3DZps 2A6JtbvAn5/mSIg2dcHtqwEAVshI9z3I9YOOhLTRkfQNj1Quu5r+W7EO2WXfrnhN0wk6 uHHK+3Hn5qmybedwg/3eqDHNk4OioPGh/n7i/mcCv+PiWHijLola+EcxhMSKpSG0PqyQ WWLw== X-Gm-Message-State: APjAAAVbOpXPXQNUIQNwONn26PgfhvIoBLL98PSHd5USv3SL5M4cqLo+ X0rty9nBmKr1GaT5aHRfjFU= X-Google-Smtp-Source: APXvYqy1cGZoaC1duyy6JSmEOesKryNZXcbz5ec5DLtsSEFpsU7HttVUGLgD8gDdtV6ofxfO1zXzUA== X-Received: by 2002:a05:600c:22d1:: with SMTP id 17mr449859wmg.62.1556133458836; Wed, 24 Apr 2019 12:17:38 -0700 (PDT) Received: from ?IPv6:2003:ea:8bd4:5700:c498:ee8f:ff0a:13e5? (p200300EA8BD45700C498EE8FFF0A13E5.dip0.t-ipconnect.de. [2003:ea:8bd4:5700:c498:ee8f:ff0a:13e5]) by smtp.googlemail.com with ESMTPSA id s18sm19261192wmc.41.2019.04.24.12.17.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 24 Apr 2019 12:17:37 -0700 (PDT) Subject: [PATCH v2 1/9] PCI: add helper pci_dev_id From: Heiner Kallweit <hkallweit1@gmail.com> To: Benjamin Herrenschmidt <benh@kernel.crashing.org>, Michael Ellerman <mpe@ellerman.id.au>, Oded Gabbay <oded.gabbay@gmail.com>, Alex Deucher <alexander.deucher@amd.com>, =?utf-8?q?Christian_K=C3=B6nig?= <christian.koenig@amd.com>, "David (ChunMing) Zhou" <David1.Zhou@amd.com>, David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>, Joerg Roedel <joro@8bytes.org>, David Woodhouse <dwmw2@infradead.org>, Realtek linux nic maintainers <nic_swsd@realtek.com>, "David S. Miller" <davem@davemloft.net>, Giuseppe Cavallaro <peppe.cavallaro@st.com>, Alexandre Torgue <alexandre.torgue@st.com>, Jose Abreu <joabreu@synopsys.com>, Maxime Coquelin <mcoquelin.stm32@gmail.com>, Bjorn Helgaas <bhelgaas@google.com>, Benson Leung <bleung@chromium.org>, Enric Balletbo i Serra <enric.balletbo@collabora.com>, Stephen Rothwell <sfr@canb.auug.org.au>, Paul Mackerras <paulus@samba.org> References: <2e1f9a57-6d08-d017-24da-3e6b97fa2449@gmail.com> Message-ID: <a7980450-4ae2-9a18-4068-7463fb0190bd@gmail.com> Date: Wed, 24 Apr 2019 21:11:58 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <2e1f9a57-6d08-d017-24da-3e6b97fa2449@gmail.com> Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190424_121740_586163_300F356F X-CRM114-Status: GOOD ( 12.46 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Cc: "open list:8169 10/100/1000 GIGABIT ETHERNET DRIVER" <netdev@vger.kernel.org>, open list <linux-kernel@vger.kernel.org>, "open list:RADEON and AMDGPU DRM DRIVERS" <amd-gfx@lists.freedesktop.org>, "open list:AMD IOMMU \(AMD-VI\)" <iommu@lists.linux-foundation.org>, "open list:AMD KFD" <dri-devel@lists.freedesktop.org>, "open list:PCI SUBSYSTEM" <linux-pci@vger.kernel.org>, "moderated list:ARM/STM32 ARCHITECTURE" <linux-stm32@st-md-mailman.stormreply.com>, "moderated list:ARM/STM32 ARCHITECTURE" <linux-arm-kernel@lists.infradead.org> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP |
Series |
PCI: add help pci_dev_id
|
expand
|
diff --git a/include/linux/pci.h b/include/linux/pci.h index 2c056a7a7..28d0313a3 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -598,6 +598,11 @@ struct pci_bus { #define to_pci_bus(n) container_of(n, struct pci_bus, dev) +static inline u16 pci_dev_id(struct pci_dev *dev) +{ + return PCI_DEVID(dev->bus->number, dev->devfn); +} + /* * Returns true if the PCI bus is root (behind host-PCI bridge), * false otherwise
In several places in the kernel we find PCI_DEVID used like this: PCI_DEVID(dev->bus->number, dev->devfn) Therefore create a helper for it. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> --- include/linux/pci.h | 5 +++++ 1 file changed, 5 insertions(+)