From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752819AbdK1Wb3 (ORCPT ); Tue, 28 Nov 2017 17:31:29 -0500 Received: from merlin.infradead.org ([205.233.59.134]:60098 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751427AbdK1Wb2 (ORCPT ); Tue, 28 Nov 2017 17:31:28 -0500 To: linux-pci , Bjorn Helgaas , Guenter Roeck Cc: LKML , Fengguang Wu From: Randy Dunlap Subject: [PATCH -next] pci: add function stub for pci_get_domain_bus_and_slot() Message-ID: <80e3c9bb-fb65-4d87-76f9-db7c1273cef3@infradead.org> Date: Tue, 28 Nov 2017 14:31:21 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Randy Dunlap The coretemp driver build fails when CONFIG_PCI is not enabled because it uses a function that does not have a stub for that config case, so add the function stub. ../drivers/hwmon/coretemp.c: In function 'adjust_tjmax': ../drivers/hwmon/coretemp.c:250:9: error: implicit declaration of function 'pci_get_domain_bus_and_slot' [-Werror=implicit-function-declaration] struct pci_dev *host_bridge = pci_get_domain_bus_and_slot(0, 0, devfn); ../drivers/hwmon/coretemp.c:250:32: warning: initialization makes pointer from integer without a cast [enabled by default] struct pci_dev *host_bridge = pci_get_domain_bus_and_slot(0, 0, devfn); Signed-off-by: Randy Dunlap --- include/linux/pci.h | 3 +++ 1 file changed, 3 insertions(+) --- linux-next-20171128.orig/include/linux/pci.h +++ linux-next-20171128/include/linux/pci.h @@ -1660,6 +1660,9 @@ static inline struct pci_dev *pci_get_sl 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; }