Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [alsa-devel] [sound:for-next 2/20] drivers/pci/pci.c:5859:6: error: redefinition of 'pci_pr3_present'
@ 2019-10-17  9:42 kbuild test robot
  2019-10-17 10:04 ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: kbuild test robot @ 2019-10-17  9:42 UTC (permalink / raw)
  To: Kai-Heng Feng; +Cc: Takashi Iwai, alsa-devel, kbuild-all

[-- Attachment #1: Type: text/plain, Size: 2701 bytes --]

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@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; }
                ^~~~~~~~~~~~~~~
   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	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 15689 bytes --]

[-- Attachment #3: Type: text/plain, Size: 161 bytes --]

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [alsa-devel] [sound:for-next 2/20] drivers/pci/pci.c:5859:6: error: redefinition of 'pci_pr3_present'
  2019-10-17  9:42 [alsa-devel] [sound:for-next 2/20] drivers/pci/pci.c:5859:6: error: redefinition of 'pci_pr3_present' kbuild test robot
@ 2019-10-17 10:04 ` Takashi Iwai
  0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2019-10-17 10:04 UTC (permalink / raw)
  To: kbuild test robot; +Cc: alsa-devel, Kai-Heng Feng, kbuild-all

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@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	
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-10-17 10:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-17  9:42 [alsa-devel] [sound:for-next 2/20] drivers/pci/pci.c:5859:6: error: redefinition of 'pci_pr3_present' kbuild test robot
2019-10-17 10:04 ` Takashi Iwai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox