* [niks:has_ioport_v4 36/41] drivers/usb/host/pci-quirks.c:289:5: warning: no previous prototype for function 'usb_hcd_amd_remote_wakeup_quirk'
@ 2023-05-10 22:31 kernel test robot
2023-05-11 7:21 ` Arnd Bergmann
0 siblings, 1 reply; 6+ messages in thread
From: kernel test robot @ 2023-05-10 22:31 UTC (permalink / raw)
To: Niklas Schnelle; +Cc: llvm, oe-kbuild-all, Arnd Bergmann
tree: https://git.kernel.org/pub/scm/linux/kernel/git/niks/linux.git has_ioport_v4
head: b873f53aa1a6487f4a450747bd5ee38afad6dfe4
commit: 216a01adc35d677e5b2db113a4df427faae01e75 [36/41] usb: pci-quirks: handle HAS_IOPORT dependencies
config: x86_64-randconfig-a014 (https://download.01.org/0day-ci/archive/20230511/202305110634.RGuHbrxM-lkp@intel.com/config)
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/niks/linux.git/commit/?id=216a01adc35d677e5b2db113a4df427faae01e75
git remote add niks https://git.kernel.org/pub/scm/linux/kernel/git/niks/linux.git
git fetch --no-tags niks has_ioport_v4
git checkout 216a01adc35d677e5b2db113a4df427faae01e75
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/usb/host/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202305110634.RGuHbrxM-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/usb/host/pci-quirks.c:289:5: warning: no previous prototype for function 'usb_hcd_amd_remote_wakeup_quirk' [-Wmissing-prototypes]
int usb_hcd_amd_remote_wakeup_quirk(struct pci_dev *pdev)
^
drivers/usb/host/pci-quirks.c:289:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int usb_hcd_amd_remote_wakeup_quirk(struct pci_dev *pdev)
^
static
1 warning generated.
vim +/usb_hcd_amd_remote_wakeup_quirk +289 drivers/usb/host/pci-quirks.c
ad93562bdeecdde Andiry Xu 2011-03-01 288
7868943db1668fb Huang Rui 2013-09-16 @289 int usb_hcd_amd_remote_wakeup_quirk(struct pci_dev *pdev)
7868943db1668fb Huang Rui 2013-09-16 290 {
7868943db1668fb Huang Rui 2013-09-16 291 /* Make sure amd chipset type has already been initialized */
7868943db1668fb Huang Rui 2013-09-16 292 usb_amd_find_chipset_info();
e788787ef4f9c24 Sandeep Singh 2017-08-04 293 if (amd_chipset.sb_type.gen == AMD_CHIPSET_YANGTZE ||
e788787ef4f9c24 Sandeep Singh 2017-08-04 294 amd_chipset.sb_type.gen == AMD_CHIPSET_TAISHAN) {
7868943db1668fb Huang Rui 2013-09-16 295 dev_dbg(&pdev->dev, "QUIRK: Enable AMD remote wakeup fix\n");
7868943db1668fb Huang Rui 2013-09-16 296 return 1;
7868943db1668fb Huang Rui 2013-09-16 297 }
e788787ef4f9c24 Sandeep Singh 2017-08-04 298 return 0;
e788787ef4f9c24 Sandeep Singh 2017-08-04 299 }
7868943db1668fb Huang Rui 2013-09-16 300 EXPORT_SYMBOL_GPL(usb_hcd_amd_remote_wakeup_quirk);
7868943db1668fb Huang Rui 2013-09-16 301
:::::: The code at line 289 was first introduced by commit
:::::: 7868943db1668fba898cf71bed1506c19d6958aa usb: core: implement AMD remote wakeup quirk
:::::: TO: Huang Rui <ray.huang@amd.com>
:::::: CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [niks:has_ioport_v4 36/41] drivers/usb/host/pci-quirks.c:289:5: warning: no previous prototype for function 'usb_hcd_amd_remote_wakeup_quirk'
2023-05-10 22:31 [niks:has_ioport_v4 36/41] drivers/usb/host/pci-quirks.c:289:5: warning: no previous prototype for function 'usb_hcd_amd_remote_wakeup_quirk' kernel test robot
@ 2023-05-11 7:21 ` Arnd Bergmann
2023-05-11 8:06 ` Niklas Schnelle
0 siblings, 1 reply; 6+ messages in thread
From: Arnd Bergmann @ 2023-05-11 7:21 UTC (permalink / raw)
To: kernel test robot, Niklas Schnelle; +Cc: llvm, oe-kbuild-all
On Thu, May 11, 2023, at 00:31, kernel test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/niks/linux.git
> has_ioport_v4
> head: b873f53aa1a6487f4a450747bd5ee38afad6dfe4
> commit: 216a01adc35d677e5b2db113a4df427faae01e75 [36/41] usb:
> pci-quirks: handle HAS_IOPORT dependencies
> config: x86_64-randconfig-a014
> (https://download.01.org/0day-ci/archive/20230511/202305110634.RGuHbrxM-lkp@intel.com/config)
>
>>> drivers/usb/host/pci-quirks.c:289:5: warning: no previous prototype for function 'usb_hcd_amd_remote_wakeup_quirk' [-Wmissing-prototypes]
> int usb_hcd_amd_remote_wakeup_quirk(struct pci_dev *pdev)
> ^
> drivers/usb/host/pci-quirks.c:289:1: note: declare 'static' if the
> function is not intended to be used outside of this translation unit
> int usb_hcd_amd_remote_wakeup_quirk(struct pci_dev *pdev)
> ^
> static
> 1 warning generated.
It looks like the declaration was dropped by accident, it should
have been moved into the #ifdef.
Arnd
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [niks:has_ioport_v4 36/41] drivers/usb/host/pci-quirks.c:289:5: warning: no previous prototype for function 'usb_hcd_amd_remote_wakeup_quirk'
2023-05-11 7:21 ` Arnd Bergmann
@ 2023-05-11 8:06 ` Niklas Schnelle
2023-05-11 8:49 ` Arnd Bergmann
0 siblings, 1 reply; 6+ messages in thread
From: Niklas Schnelle @ 2023-05-11 8:06 UTC (permalink / raw)
To: Arnd Bergmann, kernel test robot; +Cc: llvm, oe-kbuild-all
On Thu, 2023-05-11 at 09:21 +0200, Arnd Bergmann wrote:
> On Thu, May 11, 2023, at 00:31, kernel test robot wrote:
> > tree: https://git.kernel.org/pub/scm/linux/kernel/git/niks/linux.git
> > has_ioport_v4
> > head: b873f53aa1a6487f4a450747bd5ee38afad6dfe4
> > commit: 216a01adc35d677e5b2db113a4df427faae01e75 [36/41] usb:
> > pci-quirks: handle HAS_IOPORT dependencies
> > config: x86_64-randconfig-a014
> > (https://download.01.org/0day-ci/archive/20230511/202305110634.RGuHbrxM-lkp@intel.com/config)
> >
> > > > drivers/usb/host/pci-quirks.c:289:5: warning: no previous prototype for function 'usb_hcd_amd_remote_wakeup_quirk' [-Wmissing-prototypes]
> > int usb_hcd_amd_remote_wakeup_quirk(struct pci_dev *pdev)
> > ^
> > drivers/usb/host/pci-quirks.c:289:1: note: declare 'static' if the
> > function is not intended to be used outside of this translation unit
> > int usb_hcd_amd_remote_wakeup_quirk(struct pci_dev *pdev)
> > ^
> > static
> > 1 warning generated.
>
> It looks like the declaration was dropped by accident, it should
> have been moved into the #ifdef.
>
> Arnd
I think I saw it but assumed that the extern declaration in
include/linux/usb/hcd.h was enough. I guess before this was hidden by
the missing CONFIG_USB_PCI_AMD. Should be fixed now.
I also fixed another issue that broke the build on my x86 workstation
because of missing the "CONFIG_" prefix in the addition of checking
CONFIG_USB_UHCI_HCD for the uhci_ quirks. This "CONFIG_" prefix
mismatch between Kconfig and code got me at least 3 times by now…
Thanks,
Niklas
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [niks:has_ioport_v4 36/41] drivers/usb/host/pci-quirks.c:289:5: warning: no previous prototype for function 'usb_hcd_amd_remote_wakeup_quirk'
2023-05-11 8:06 ` Niklas Schnelle
@ 2023-05-11 8:49 ` Arnd Bergmann
2023-05-11 9:34 ` Niklas Schnelle
0 siblings, 1 reply; 6+ messages in thread
From: Arnd Bergmann @ 2023-05-11 8:49 UTC (permalink / raw)
To: Niklas Schnelle, kernel test robot; +Cc: llvm, oe-kbuild-all
On Thu, May 11, 2023, at 10:06, Niklas Schnelle wrote:
> On Thu, 2023-05-11 at 09:21 +0200, Arnd Bergmann wrote:
>> On Thu, May 11, 2023, at 00:31, kernel test robot wrote:
>> > tree: https://git.kernel.org/pub/scm/linux/kernel/git/niks/linux.git
>> > has_ioport_v4
>> > head: b873f53aa1a6487f4a450747bd5ee38afad6dfe4
>> > commit: 216a01adc35d677e5b2db113a4df427faae01e75 [36/41] usb:
>> > pci-quirks: handle HAS_IOPORT dependencies
>> > config: x86_64-randconfig-a014
>> > (https://download.01.org/0day-ci/archive/20230511/202305110634.RGuHbrxM-lkp@intel.com/config)
>> >
>> > > > drivers/usb/host/pci-quirks.c:289:5: warning: no previous prototype for function 'usb_hcd_amd_remote_wakeup_quirk' [-Wmissing-prototypes]
>> > int usb_hcd_amd_remote_wakeup_quirk(struct pci_dev *pdev)
>> > ^
>> > drivers/usb/host/pci-quirks.c:289:1: note: declare 'static' if the
>> > function is not intended to be used outside of this translation unit
>> > int usb_hcd_amd_remote_wakeup_quirk(struct pci_dev *pdev)
>> > ^
>> > static
>> > 1 warning generated.
>>
>> It looks like the declaration was dropped by accident, it should
>> have been moved into the #ifdef.
>>
>> Arnd
>
> I think I saw it but assumed that the extern declaration in
> include/linux/usb/hcd.h was enough. I guess before this was hidden by
> the missing CONFIG_USB_PCI_AMD. Should be fixed now.
Ok. It looks like linux/usb/hcd.h is just not included in quirks.c,
so adding an #include should also fix it.
Arnd
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [niks:has_ioport_v4 36/41] drivers/usb/host/pci-quirks.c:289:5: warning: no previous prototype for function 'usb_hcd_amd_remote_wakeup_quirk'
2023-05-11 8:49 ` Arnd Bergmann
@ 2023-05-11 9:34 ` Niklas Schnelle
2023-05-11 10:27 ` Arnd Bergmann
0 siblings, 1 reply; 6+ messages in thread
From: Niklas Schnelle @ 2023-05-11 9:34 UTC (permalink / raw)
To: Arnd Bergmann, kernel test robot; +Cc: llvm, oe-kbuild-all
On Thu, 2023-05-11 at 10:49 +0200, Arnd Bergmann wrote:
> On Thu, May 11, 2023, at 10:06, Niklas Schnelle wrote:
> > On Thu, 2023-05-11 at 09:21 +0200, Arnd Bergmann wrote:
> > > On Thu, May 11, 2023, at 00:31, kernel test robot wrote:
> > > > tree: https://git.kernel.org/pub/scm/linux/kernel/git/niks/linux.git
> > > > has_ioport_v4
> > > > head: b873f53aa1a6487f4a450747bd5ee38afad6dfe4
> > > > commit: 216a01adc35d677e5b2db113a4df427faae01e75 [36/41] usb:
> > > > pci-quirks: handle HAS_IOPORT dependencies
> > > > config: x86_64-randconfig-a014
> > > > (https://download.01.org/0day-ci/archive/20230511/202305110634.RGuHbrxM-lkp@intel.com/config)
> > > >
> > > > > > drivers/usb/host/pci-quirks.c:289:5: warning: no previous prototype for function 'usb_hcd_amd_remote_wakeup_quirk' [-Wmissing-prototypes]
> > > > int usb_hcd_amd_remote_wakeup_quirk(struct pci_dev *pdev)
> > > > ^
> > > > drivers/usb/host/pci-quirks.c:289:1: note: declare 'static' if the
> > > > function is not intended to be used outside of this translation unit
> > > > int usb_hcd_amd_remote_wakeup_quirk(struct pci_dev *pdev)
> > > > ^
> > > > static
> > > > 1 warning generated.
> > >
> > > It looks like the declaration was dropped by accident, it should
> > > have been moved into the #ifdef.
> > >
> > > Arnd
> >
> > I think I saw it but assumed that the extern declaration in
> > include/linux/usb/hcd.h was enough. I guess before this was hidden by
> > the missing CONFIG_USB_PCI_AMD. Should be fixed now.
>
> Ok. It looks like linux/usb/hcd.h is just not included in quirks.c,
> so adding an #include should also fix it.
>
> Arnd
It feels a little cleaner to keep it in pci-quirks.h where it was
before the patch. I just wonder if we then also need an #ifdef
CONFIG_USB_PCI_AMD around the extern declaration?
Thanks
Niklas
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [niks:has_ioport_v4 36/41] drivers/usb/host/pci-quirks.c:289:5: warning: no previous prototype for function 'usb_hcd_amd_remote_wakeup_quirk'
2023-05-11 9:34 ` Niklas Schnelle
@ 2023-05-11 10:27 ` Arnd Bergmann
0 siblings, 0 replies; 6+ messages in thread
From: Arnd Bergmann @ 2023-05-11 10:27 UTC (permalink / raw)
To: Niklas Schnelle, kernel test robot; +Cc: llvm, oe-kbuild-all
On Thu, May 11, 2023, at 11:34, Niklas Schnelle wrote:
> On Thu, 2023-05-11 at 10:49 +0200, Arnd Bergmann wrote:
>> >
>> > I think I saw it but assumed that the extern declaration in
>> > include/linux/usb/hcd.h was enough. I guess before this was hidden by
>> > the missing CONFIG_USB_PCI_AMD. Should be fixed now.
>>
>> Ok. It looks like linux/usb/hcd.h is just not included in quirks.c,
>> so adding an #include should also fix it.
>
> It feels a little cleaner to keep it in pci-quirks.h where it was
> before the patch. I just wonder if we then also need an #ifdef
> CONFIG_USB_PCI_AMD around the extern declaration?
I generally prefer not to have an #ifdef around an extern declaration
unless there is a 'static inline' version in the #else path.
Arnd
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-05-11 10:28 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-10 22:31 [niks:has_ioport_v4 36/41] drivers/usb/host/pci-quirks.c:289:5: warning: no previous prototype for function 'usb_hcd_amd_remote_wakeup_quirk' kernel test robot
2023-05-11 7:21 ` Arnd Bergmann
2023-05-11 8:06 ` Niklas Schnelle
2023-05-11 8:49 ` Arnd Bergmann
2023-05-11 9:34 ` Niklas Schnelle
2023-05-11 10:27 ` Arnd Bergmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox