* [PATCH] usb: cdns3: Fixed kernel test robot warning
@ 2020-12-09 20:15 Souptick Joarder
2020-12-09 21:12 ` Randy Dunlap
2020-12-10 6:12 ` Greg KH
0 siblings, 2 replies; 4+ messages in thread
From: Souptick Joarder @ 2020-12-09 20:15 UTC (permalink / raw)
To: pawell, peter.chen, rogerq, a-govindraju, gregkh
Cc: linux-usb, linux-kernel, Souptick Joarder
Kernel test robot throws below warning ->
In file included from drivers/usb/cdns3/core.c:23:
>> drivers/usb/cdns3/host-export.h:27:51: warning: 'struct usb_hcd'
>> declared inside parameter list will not be visible outside of this
>> definition or declaration
27 | static inline int xhci_cdns3_suspend_quirk(struct usb_hcd
*hcd)
| ^~~~~~~
This patch will silence it.
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>
---
drivers/usb/cdns3/host-export.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/cdns3/host-export.h b/drivers/usb/cdns3/host-export.h
index fb8541b..c1259af 100644
--- a/drivers/usb/cdns3/host-export.h
+++ b/drivers/usb/cdns3/host-export.h
@@ -24,7 +24,7 @@ static inline int cdns_host_init(struct cdns *cdns)
}
static inline void cdns_host_exit(struct cdns *cdns) { }
-static inline int xhci_cdns3_suspend_quirk(struct usb_hcd *hcd)
+static int xhci_cdns3_suspend_quirk(struct usb_hcd *hcd)
{
return 0;
}
--
1.9.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] usb: cdns3: Fixed kernel test robot warning
2020-12-09 20:15 [PATCH] usb: cdns3: Fixed kernel test robot warning Souptick Joarder
@ 2020-12-09 21:12 ` Randy Dunlap
2020-12-10 5:30 ` Pawel Laszczak
2020-12-10 6:12 ` Greg KH
1 sibling, 1 reply; 4+ messages in thread
From: Randy Dunlap @ 2020-12-09 21:12 UTC (permalink / raw)
To: Souptick Joarder, pawell, peter.chen, rogerq, a-govindraju,
gregkh
Cc: linux-usb, linux-kernel
On 12/9/20 12:15 PM, Souptick Joarder wrote:
> Kernel test robot throws below warning ->
>
> In file included from drivers/usb/cdns3/core.c:23:
>>> drivers/usb/cdns3/host-export.h:27:51: warning: 'struct usb_hcd'
>>> declared inside parameter list will not be visible outside of this
>>> definition or declaration
> 27 | static inline int xhci_cdns3_suspend_quirk(struct usb_hcd
> *hcd)
> | ^~~~~~~
>
> This patch will silence it.
Really? Didn't silence it for me when I tested this patch.
Also, please see
https://lore.kernel.org/linux-usb/DBBPR04MB7979502194410BB1AE96DF038BCC0@DBBPR04MB7979.eurprd04.prod.outlook.com/T/#m7f73fdd57c0f1577fb610dcaf28646b53fa7dc26
(what a strange URL)
I now get these 2 warnings:
In file included from ../drivers/usb/cdns3/core.c:23:0:
../drivers/usb/cdns3/host-export.h:27:44: warning: ‘struct usb_hcd’ declared inside parameter list will not be visible outside of this definition or declaration
static int xhci_cdns3_suspend_quirk(struct usb_hcd *hcd)
^~~~~~~
CC [M] drivers/usb/gadget/function/uvc_queue.o
../drivers/usb/cdns3/host-export.h:27:12: warning: ‘xhci_cdns3_suspend_quirk’ defined but not used [-Wunused-function]
static int xhci_cdns3_suspend_quirk(struct usb_hcd *hcd)
^~~~~~~~~~~~~~~~~~~~~~~~
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>
> ---
> drivers/usb/cdns3/host-export.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/usb/cdns3/host-export.h b/drivers/usb/cdns3/host-export.h
> index fb8541b..c1259af 100644
> --- a/drivers/usb/cdns3/host-export.h
> +++ b/drivers/usb/cdns3/host-export.h
> @@ -24,7 +24,7 @@ static inline int cdns_host_init(struct cdns *cdns)
> }
>
> static inline void cdns_host_exit(struct cdns *cdns) { }
> -static inline int xhci_cdns3_suspend_quirk(struct usb_hcd *hcd)
> +static int xhci_cdns3_suspend_quirk(struct usb_hcd *hcd)
> {
> return 0;
> }
>
--
~Randy
Reported-by: Randy Dunlap <rdunlap@infradead.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PATCH] usb: cdns3: Fixed kernel test robot warning
2020-12-09 21:12 ` Randy Dunlap
@ 2020-12-10 5:30 ` Pawel Laszczak
0 siblings, 0 replies; 4+ messages in thread
From: Pawel Laszczak @ 2020-12-10 5:30 UTC (permalink / raw)
To: Randy Dunlap, Souptick Joarder, peter.chen@nxp.com, rogerq@ti.com,
a-govindraju@ti.com, gregkh@linuxfoundation.org
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
>
>On 12/9/20 12:15 PM, Souptick Joarder wrote:
>> Kernel test robot throws below warning ->
>>
>> In file included from drivers/usb/cdns3/core.c:23:
>>>> drivers/usb/cdns3/host-export.h:27:51: warning: 'struct usb_hcd'
>>>> declared inside parameter list will not be visible outside of this
>>>> definition or declaration
>> 27 | static inline int xhci_cdns3_suspend_quirk(struct usb_hcd
>> *hcd)
>> | ^~~~~~~
>>
>> This patch will silence it.
>
>Really? Didn't silence it for me when I tested this patch.
>
>Also, please see
>
>https://urldefense.com/v3/__https://lore.kernel.org/linux-
>usb/DBBPR04MB7979502194410BB1AE96DF038BCC0@DBBPR04MB7979.eurprd04.prod.outlook.com/T/*m7f73fdd57c0f1577fb610dc
>af28646b53fa7dc26__;Iw!!EHscmS1ygiU1lA!XZzHlY6luEH3QepkggEsHS0x7oNNiz0XI9Xey3oIQpfSd1UVQEGzXbgXpfS2Eg$
>
>(what a strange URL)
>
>I now get these 2 warnings:
>
>In file included from ../drivers/usb/cdns3/core.c:23:0:
>../drivers/usb/cdns3/host-export.h:27:44: warning: ‘struct usb_hcd’ declared inside parameter list will not be visible outside of this
>definition or declaration
> static int xhci_cdns3_suspend_quirk(struct usb_hcd *hcd)
> ^~~~~~~
> CC [M] drivers/usb/gadget/function/uvc_queue.o
>../drivers/usb/cdns3/host-export.h:27:12: warning: ‘xhci_cdns3_suspend_quirk’ defined but not used [-Wunused-function]
> static int xhci_cdns3_suspend_quirk(struct usb_hcd *hcd)
> ^~~~~~~~~~~~~~~~~~~~~~~~
>
The best way for resolving this issue is to remove xhci_cdns3_suspend_quirk
from host-export.h file. It's used only in host.c file so it can be declared there
as static.
Thanks
Pawel
>
>> Reported-by: kernel test robot <lkp@intel.com>
>> Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>
>> ---
>> drivers/usb/cdns3/host-export.h | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/usb/cdns3/host-export.h b/drivers/usb/cdns3/host-export.h
>> index fb8541b..c1259af 100644
>> --- a/drivers/usb/cdns3/host-export.h
>> +++ b/drivers/usb/cdns3/host-export.h
>> @@ -24,7 +24,7 @@ static inline int cdns_host_init(struct cdns *cdns)
>> }
>>
>> static inline void cdns_host_exit(struct cdns *cdns) { }
>> -static inline int xhci_cdns3_suspend_quirk(struct usb_hcd *hcd)
>> +static int xhci_cdns3_suspend_quirk(struct usb_hcd *hcd)
>> {
>> return 0;
>> }
>>
>
>
>--
>~Randy
>Reported-by: Randy Dunlap <rdunlap@infradead.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] usb: cdns3: Fixed kernel test robot warning
2020-12-09 20:15 [PATCH] usb: cdns3: Fixed kernel test robot warning Souptick Joarder
2020-12-09 21:12 ` Randy Dunlap
@ 2020-12-10 6:12 ` Greg KH
1 sibling, 0 replies; 4+ messages in thread
From: Greg KH @ 2020-12-10 6:12 UTC (permalink / raw)
To: Souptick Joarder
Cc: pawell, peter.chen, rogerq, a-govindraju, linux-usb, linux-kernel
On Thu, Dec 10, 2020 at 01:45:52AM +0530, Souptick Joarder wrote:
> Kernel test robot throws below warning ->
>
> In file included from drivers/usb/cdns3/core.c:23:
> >> drivers/usb/cdns3/host-export.h:27:51: warning: 'struct usb_hcd'
> >> declared inside parameter list will not be visible outside of this
> >> definition or declaration
> 27 | static inline int xhci_cdns3_suspend_quirk(struct usb_hcd
> *hcd)
> | ^~~~~~~
>
> This patch will silence it.
>
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>
> ---
> drivers/usb/cdns3/host-export.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/usb/cdns3/host-export.h b/drivers/usb/cdns3/host-export.h
> index fb8541b..c1259af 100644
> --- a/drivers/usb/cdns3/host-export.h
> +++ b/drivers/usb/cdns3/host-export.h
> @@ -24,7 +24,7 @@ static inline int cdns_host_init(struct cdns *cdns)
> }
>
> static inline void cdns_host_exit(struct cdns *cdns) { }
> -static inline int xhci_cdns3_suspend_quirk(struct usb_hcd *hcd)
> +static int xhci_cdns3_suspend_quirk(struct usb_hcd *hcd)
That should not change anything for this warning, sorry.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-12-10 6:13 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-09 20:15 [PATCH] usb: cdns3: Fixed kernel test robot warning Souptick Joarder
2020-12-09 21:12 ` Randy Dunlap
2020-12-10 5:30 ` Pawel Laszczak
2020-12-10 6:12 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).