From patchwork Tue Nov 28 22:31:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Randy Dunlap X-Patchwork-Id: 10081193 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 ACBDA602BC for ; Tue, 28 Nov 2017 22:31:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9FBB0296B7 for ; Tue, 28 Nov 2017 22:31:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 94396296D8; Tue, 28 Nov 2017 22:31:30 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham 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 1AACB296B7 for ; Tue, 28 Nov 2017 22:31:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751732AbdK1Wb2 (ORCPT ); Tue, 28 Nov 2017 17:31:28 -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 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Transfer-Encoding:Content-Type: MIME-Version:Date:Message-ID:Subject:From:Cc:To:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=/969sHhZ0be4OquJRJoUQbutp5s2JZSp0kExnpQw/Xg=; b=B1q8GGdz67H2G9FIorD9Ek6pQq VzkPCspQ+Qp4jdZSwf+Xkt1IDNmlq7c/Pr4W/oqEsQOXcbJSnGtT2ljfTIXRldW7g9tMZHocqHHiU tVQEECLWwbUWRSt3BIedUV51ubNCnvt9j46NOinTS8IS1AmKKxyzCK7ejiyIovvYi2+fE9cii3G2Y GnmPxNk+R2egTst9627/T/mNjQsladarlctdPcJbazgX/P7qWYgwZKlU8X8pGvMKhAIWmEcRI4ba/ pd+kZgmJ0ehHs2MXeWDSfN/Zv3F3ueSa8CwdYkahpdgmqYzeI8HQep0RdzNm5kYmXS4sVFSt+sOr3 f1Zaz9ZQ==; Received: from static-50-53-52-16.bvtn.or.frontiernet.net ([50.53.52.16] helo=midway.dunlap) by merlin.infradead.org with esmtpsa (Exim 4.87 #1 (Red Hat Linux)) id 1eJoPS-0006as-OB; Tue, 28 Nov 2017 22:31:23 +0000 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-Language: en-US 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 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 Acked-by: Guenter Roeck --- 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; }