diff mbox series

[-next] udc: lpc32xx: make symbol 'lpc32xx_usbddata' static

Message ID 20200707105350.7064-1-weiyongjun1@huawei.com (mailing list archive)
State Mainlined
Commit 25051b55a2f6f05a15ba60f81e1f529b751aab5b
Headers show
Series [-next] udc: lpc32xx: make symbol 'lpc32xx_usbddata' static | expand

Commit Message

Wei Yongjun July 7, 2020, 10:53 a.m. UTC
The sparse tool complains as follows:

drivers/usb/gadget/udc/lpc32xx_udc.c:2989:25: warning:
 symbol 'lpc32xx_usbddata' was not declared. Should it be static?

This variable is not used outside of lpc32xx_udc.c, so this commit
marks it static.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/usb/gadget/udc/lpc32xx_udc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Vladimir Zapolskiy July 12, 2020, 7:51 a.m. UTC | #1
On 7/7/20 1:53 PM, Wei Yongjun wrote:
> The sparse tool complains as follows:
> 
> drivers/usb/gadget/udc/lpc32xx_udc.c:2989:25: warning:
>  symbol 'lpc32xx_usbddata' was not declared. Should it be static?
> 
> This variable is not used outside of lpc32xx_udc.c, so this commit
> marks it static.
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>

Acked-by: Vladimir Zapolskiy <vz@mleia.com>

--
Best wishes,
Vladimir
diff mbox series

Patch

diff --git a/drivers/usb/gadget/udc/lpc32xx_udc.c b/drivers/usb/gadget/udc/lpc32xx_udc.c
index 4a112670cc6c..e8a4637a9a17 100644
--- a/drivers/usb/gadget/udc/lpc32xx_udc.c
+++ b/drivers/usb/gadget/udc/lpc32xx_udc.c
@@ -2986,7 +2986,7 @@  static void lpc32xx_rmwkup_chg(int remote_wakup_enable)
 	/* Enable or disable USB remote wakeup */
 }
 
-struct lpc32xx_usbd_cfg lpc32xx_usbddata = {
+static struct lpc32xx_usbd_cfg lpc32xx_usbddata = {
 	.vbus_drv_pol = 0,
 	.conn_chgb = &lpc32xx_usbd_conn_chg,
 	.susp_chgb = &lpc32xx_usbd_susp_chg,