From patchwork Wed Dec 6 14:17:30 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 10095945 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 6488760210 for ; Wed, 6 Dec 2017 14:19:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 586AF28AC5 for ; Wed, 6 Dec 2017 14:19:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4D06A29B79; Wed, 6 Dec 2017 14:19:29 +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=-6.9 required=2.0 tests=BAYES_00,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 D0D3F28AC5 for ; Wed, 6 Dec 2017 14:19:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752457AbdLFOTP (ORCPT ); Wed, 6 Dec 2017 09:19:15 -0500 Received: from mout.kundenserver.de ([212.227.126.133]:62416 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752366AbdLFOTE (ORCPT ); Wed, 6 Dec 2017 09:19:04 -0500 Received: from wuerfel.lan ([149.172.96.106]) by mrelayeu.kundenserver.de (mreue005 [212.227.15.129]) with ESMTPA (Nemesis) id 0MY28S-1eZfQh18QC-00UqNA; Wed, 06 Dec 2017 15:17:55 +0100 From: Arnd Bergmann To: Bjorn Helgaas Cc: Arnd Bergmann , Sinan Kaya , Guenter Roeck , Lorenzo Pieralisi , David Woodhouse , "Rafael J. Wysocki" , Thomas Gleixner , Matthew Minter , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] pci: provide pci_get_domain_bus_and_slot dummy helper Date: Wed, 6 Dec 2017 15:17:30 +0100 Message-Id: <20171206141751.757163-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:z5DE5uHpr5xKyoQs7pwA7r9tfkfznVd/dF1RbO7us+ZuQeh2HoH QyjLEJE3X9tGfV8H5IGqa5lTi5rJcfVsakayh6HBSIgFXVOmbDbsvzoCRf2MOWiRUtB4PoJ mq6Rt0YCtzdWv3ntMwoCLQh9eP1ZA5R1iQFhKMzQjbUjrJsI2amx8FVCHBwYDiZ/j7qFpwT /YA1QUOdcypdDlfXwXIhw== X-UI-Out-Filterresults: notjunk:1; V01:K0:pdnxmx5N7B8=:VDanRRorN3djool2/v9gT/ sXqJ4OCvhDE/9wztNg4MHgMip5vvOOJFuAwYB2vZmQQ7D0dse6E0++dMUt3J+vncXxT8ek2eI CPLkI6G2DGcJEVDbsPnbnBjX4Wh0+RpiPvN6PR+6H9Eg5WAP0y0ocLiFKEH0FfXIv11G91ISu dVNYEcBeymE7MpfB7Ihib6tyeLSldW42qOim++NCeXRpBgkSzYPhwaXghL7rPdi83+MCD3mBd 5l3jNgNyAGeXeI+YIRTA/VV4pvHgJmA6uTs1/JAZCDP8GdtXXCldcFdP2GBp5rPQSrRECREBi Eerlyo+izOxzF35T9FQcyS3CLVpP1073BZLlRcoIbra88jihvpA1Zmcn5pu8Z74rx/8Gr+OTz oC4QTHeNE8oI5kinM5K5V8I5F1LkByzRYhqtUgAtLGObvp1HBLJx/Mk9pE8MnuBr4SqUKekCC WB1ydYUWtLUHHLr4PT9mnkjYg7Kj73BFRI45kTHrtjG41Y+b1F/e8AW42oXKcvO7oBMDRdg1m TriEXzit6+YoirDbXinLq96NBbohf8lQJ7AEli4zXQ4chhsdXYPZWh9inSETBDbZarmyHFn1c YT6nYdRcRGR9WOPxWSiw2M23HstB53FZW4TLmMcNC7+UsIKaYwU+tlVgbjoGAMW5MIzkAyEvf //w3L/ONJQm4N3TY0WP0BBDUY6y3Avek3aEHUng7YRTftsXFoFZKdHwkKCtFIdIauXxDQlyIs lTFDcDoGeOfebAdYlBUrG/HTelABovyzhklxfA== 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 When CONFIG_PCI is disabled, we still provide a pci_get_bus_and_slot() function that always returns NULL, but do not provide the same helper for pci_get_domain_bus_and_slot(): Replacing pci_get_bus_and_slot with pci_get_domain_bus_and_slot now causes a build error because of that: drivers/hwmon/coretemp.c: In function 'adjust_tjmax': drivers/hwmon/coretemp.c:250:32: error: implicit declaration of function 'pci_get_domain_bus_and_slot'; did you mean 'pci_get_bus_and_slot'? [-Werror=implicit-function-declaration] struct pci_dev *host_bridge = pci_get_domain_bus_and_slot(0, 0, devfn); This adds the missing helper function. Fixes: 1630bd42079c ("hwmon: (coretemp) deprecate pci_get_bus_and_slot()") Cc: Sinan Kaya Cc: Guenter Roeck Signed-off-by: Arnd Bergmann --- It would be good to get this into v4.15, in order to increase the chances of it still working after the conversion patches get merged during the v4.16 merge window. --- include/linux/pci.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/linux/pci.h b/include/linux/pci.h index a1589dec7e33..69815397365e 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -1660,6 +1660,10 @@ static inline struct pci_dev *pci_get_slot(struct pci_bus *bus, static inline struct pci_dev *pci_get_bus_and_slot(unsigned int bus, unsigned int devfn) { return NULL; } +static inline struct pci_dev *pci_get_domain_bus_and_slot(int domain, + unsigned int bus, + unsigned int devfn) +{ return NULL; } static inline int pci_domain_nr(struct pci_bus *bus) { return 0; } static inline struct pci_dev *pci_dev_get(struct pci_dev *dev) { return NULL; }