[alsa-devel] [sound:for-next 2/20] drivers/pci/pci.c:5859:6: error: redefinition of 'pci_pr3_present'
Takashi Iwai
tiwai at suse.de
Thu Oct 17 12:04:23 CEST 2019
On Thu, 17 Oct 2019 11:42:47 +0200,
kbuild test robot wrote:
>
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git for-next
> head: fa5a68b2abcefe2204075c80662e02cf59567a9f
> commit: 2e1a529c10e18e62da55eac42c278f11216dddaa [2/20] PCI: Add pci_pr3_present() helper to check Power Resource for D3hot
> config: parisc-c3000_defconfig (attached as .config)
> compiler: hppa-linux-gcc (GCC) 7.4.0
> reproduce:
> wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> chmod +x ~/bin/make.cross
> git checkout 2e1a529c10e18e62da55eac42c278f11216dddaa
> # save the attached .config to linux build tree
> GCC_VERSION=7.4.0 make.cross ARCH=parisc
>
> If you fix the issue, kindly add following tag
> Reported-by: kbuild test robot <lkp at intel.com>
>
> All errors (new ones prefixed by >>):
>
> >> drivers/pci/pci.c:5859:6: error: redefinition of 'pci_pr3_present'
> bool pci_pr3_present(struct pci_dev *pdev)
> ^~~~~~~~~~~~~~~
> In file included from include/linux/of_pci.h:5:0,
> from drivers/pci/pci.c:17:
> include/linux/pci.h:2317:13: note: previous definition of 'pci_pr3_present' was here
> static bool pci_pr3_present(struct pci_dev *pdev) { return false; }
> ^~~~~~~~~~~~~~~
It looks like the ifdef CONFIG_ACPI is missing in pci_pr3_present()
definition in pci.c.
I drop the two patches for now.
Kai-Heng, could you resubmit with the proper fix?
thanks,
Takashi
> drivers/pci/pci.c: In function 'pci_pr3_present':
> >> drivers/pci/pci.c:5870:13: error: dereferencing pointer to incomplete type 'struct acpi_device'
> return adev->power.flags.power_resources &&
> ^~
> >> drivers/pci/pci.c:5871:3: error: implicit declaration of function 'acpi_has_method'; did you mean 'acpi_has_watchdog'? [-Werror=implicit-function-declaration]
> acpi_has_method(adev->handle, "_PR3");
> ^~~~~~~~~~~~~~~
> acpi_has_watchdog
> In file included from include/linux/of_pci.h:5:0,
> from drivers/pci/pci.c:17:
> At top level:
> include/linux/pci.h:2317:13: warning: 'pci_pr3_present' defined but not used [-Wunused-function]
> static bool pci_pr3_present(struct pci_dev *pdev) { return false; }
> ^~~~~~~~~~~~~~~
> cc1: some warnings being treated as errors
>
> vim +/pci_pr3_present +5859 drivers/pci/pci.c
>
> 5858
> > 5859 bool pci_pr3_present(struct pci_dev *pdev)
> 5860 {
> 5861 struct acpi_device *adev;
> 5862
> 5863 if (acpi_disabled)
> 5864 return false;
> 5865
> 5866 adev = ACPI_COMPANION(&pdev->dev);
> 5867 if (!adev)
> 5868 return false;
> 5869
> > 5870 return adev->power.flags.power_resources &&
> > 5871 acpi_has_method(adev->handle, "_PR3");
> 5872 }
> 5873 EXPORT_SYMBOL_GPL(pci_pr3_present);
> 5874
More information about the Alsa-devel
mailing list