2020-07-06 13:35:01

by Lee Jones

[permalink] [raw]
Subject: [PATCH 12/32] usb: gadget: udc: lpc32xx_udc: Staticify 2 local functions

These are not used outside of this sourcefile, so make them static.

Fixes the following W=1 kernel build warning(s):

drivers/usb/gadget/udc/lpc32xx_udc.c:1929:6: warning: no previous prototype for ‘udc_send_in_zlp’ [-Wmissing-prototypes]
1929 | void udc_send_in_zlp(struct lpc32xx_udc *udc, struct lpc32xx_ep *ep)
| ^~~~~~~~~~~~~~~
drivers/usb/gadget/udc/lpc32xx_udc.c:1943:6: warning: no previous prototype for ‘udc_handle_eps’ [-Wmissing-prototypes]
1943 | void udc_handle_eps(struct lpc32xx_udc *udc, struct lpc32xx_ep *ep)
| ^~~~~~~~~~~~~~

Cc: Felipe Balbi <[email protected]>
Cc: Vladimir Zapolskiy <[email protected]>
Cc: Sylvain Lemieux <[email protected]>
Cc: Kevin Wells <[email protected]>
Cc: Roland Stigge <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
---
drivers/usb/gadget/udc/lpc32xx_udc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/gadget/udc/lpc32xx_udc.c b/drivers/usb/gadget/udc/lpc32xx_udc.c
index 465d0b7c6522a..4a112670cc6c4 100644
--- a/drivers/usb/gadget/udc/lpc32xx_udc.c
+++ b/drivers/usb/gadget/udc/lpc32xx_udc.c
@@ -1926,7 +1926,7 @@ static const struct usb_ep_ops lpc32xx_ep_ops = {
};

/* Send a ZLP on a non-0 IN EP */
-void udc_send_in_zlp(struct lpc32xx_udc *udc, struct lpc32xx_ep *ep)
+static void udc_send_in_zlp(struct lpc32xx_udc *udc, struct lpc32xx_ep *ep)
{
/* Clear EP status */
udc_clearep_getsts(udc, ep->hwep_num);
@@ -1940,7 +1940,7 @@ void udc_send_in_zlp(struct lpc32xx_udc *udc, struct lpc32xx_ep *ep)
* This function will only be called when a delayed ZLP needs to be sent out
* after a DMA transfer has filled both buffers.
*/
-void udc_handle_eps(struct lpc32xx_udc *udc, struct lpc32xx_ep *ep)
+static void udc_handle_eps(struct lpc32xx_udc *udc, struct lpc32xx_ep *ep)
{
u32 epstatus;
struct lpc32xx_request *req;
--
2.25.1


2020-07-07 06:17:00

by Vladimir Zapolskiy

[permalink] [raw]
Subject: Re: [PATCH 12/32] usb: gadget: udc: lpc32xx_udc: Staticify 2 local functions

On 7/6/20 4:33 PM, Lee Jones wrote:
> These are not used outside of this sourcefile, so make them static.
>
> Fixes the following W=1 kernel build warning(s):
>
> drivers/usb/gadget/udc/lpc32xx_udc.c:1929:6: warning: no previous prototype for ‘udc_send_in_zlp’ [-Wmissing-prototypes]
> 1929 | void udc_send_in_zlp(struct lpc32xx_udc *udc, struct lpc32xx_ep *ep)
> | ^~~~~~~~~~~~~~~
> drivers/usb/gadget/udc/lpc32xx_udc.c:1943:6: warning: no previous prototype for ‘udc_handle_eps’ [-Wmissing-prototypes]
> 1943 | void udc_handle_eps(struct lpc32xx_udc *udc, struct lpc32xx_ep *ep)
> | ^~~~~~~~~~~~~~
>
> Cc: Felipe Balbi <[email protected]>
> Cc: Vladimir Zapolskiy <[email protected]>
> Cc: Sylvain Lemieux <[email protected]>
> Cc: Kevin Wells <[email protected]>
> Cc: Roland Stigge <[email protected]>
> Signed-off-by: Lee Jones <[email protected]>

Acked-by: Vladimir Zapolskiy <[email protected]>

--
Best wishes,
Vladimir