From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752680AbdK1WcX (ORCPT ); Tue, 28 Nov 2017 17:32:23 -0500 Received: from merlin.infradead.org ([205.233.59.134]:60122 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751497AbdK1WcV (ORCPT ); Tue, 28 Nov 2017 17:32:21 -0500 Subject: Re: [PATCH] hwmon/coretemp: requires CONFIG_PCI To: Guenter Roeck Cc: linux-hwmon@vger.kernel.org, Jean Delvare , LKML , Rudolf Marek , Thomas Gleixner , Fenghua Yu References: <588e0d93-de4f-31ec-2d0b-81843db4966d@infradead.org> <20171128214152.GA8849@roeck-us.net> From: Randy Dunlap Message-ID: <51c092a0-6eb1-2290-b331-7a1223e5e330@infradead.org> Date: Tue, 28 Nov 2017 14:32:16 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <20171128214152.GA8849@roeck-us.net> 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 On 11/28/2017 01:41 PM, Guenter Roeck wrote: > On Tue, Nov 28, 2017 at 09:39:02AM -0800, Randy Dunlap wrote: >> From: Randy Dunlap >> >> Fix coretemp.c build when CONFIG_PCI is not enabled. >> Fixes these build errors: >> >> ../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); >> > > nack, sorry. No problem. > The dependency is artificial, and the code using it is only needed for old > CPUs. There should be a dummy function for pci_get_domain_bus_and_slot() > if PCI is disabled, similar to pci_get_bus_and_slot() and all the other > pci functions. If that is unacceptable for some reason, I rather revert > the patch introducing the use of pci_get_domain_bus_and_slot(). I sent a patch with that function stub addition. > After all, it doesn't add any real value to enforce the use of > pci_get_domain_bus_and_slot() in the driver, a dummy function for > pci_get_bus_and_slot() _is_ available, and the new function is quite > obviously not a 1:1 replacement of pci_get_bus_and_slot(). > > Guenter > >> Signed-off-by: Randy Dunlap >> Cc: Rudolf Marek >> Cc: Jean Delvare >> Cc: Guenter Roeck >> Cc: linux-hwmon@vger.kernel.org >> Cc: Fenghua Yu >> Cc: Thomas Gleixner >> --- >> drivers/hwmon/Kconfig | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) -- ~Randy