[PATCH] udc: lpc32xx: mark local function static

Subsystems: the rest, usb subsystem

STALE2221d

3 messages, 2 authors, 2020-07-06 · open the first message on its own page

[PATCH] udc: lpc32xx: mark local function static

From: Arnd Bergmann <arnd@arndb.de>
Date: 2020-06-30 11:59:08

The kernel test robot reports two functions that should be marked
static:
quoted
drivers/usb/gadget/udc/lpc32xx_udc.c:1928:6: warning: no previous prototype for 'udc_send_in_zlp' [-Wmissing-prototypes]
    1928 | void udc_send_in_zlp(struct lpc32xx_udc *udc, struct lpc32xx_ep *ep)
quoted
drivers/usb/gadget/udc/lpc32xx_udc.c:1942:6: warning: no previous prototype for 'udc_handle_eps' [-Wmissing-prototypes]
    1942 | void udc_handle_eps(struct lpc32xx_udc *udc, struct lpc32xx_ep *ep)

This showed up after my commit 792e559e94bc ("udc: lpc32xx: fix 64-bit
compiler warning") made it possible to build the driver on x86-64.

Fix the warning as suggested.

Reported-by: kernel test robot <redacted>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 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 465d0b7c6522..4a112670cc6c 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.27.0

Re: [PATCH] udc: lpc32xx: mark local function static

From: Vladimir Zapolskiy <vz@mleia.com>
Date: 2020-06-30 18:38:39

Hi Arnd, thank you for the patch.

On 6/30/20 2:58 PM, Arnd Bergmann wrote:
The kernel test robot reports two functions that should be marked
static:
quoted
quoted
drivers/usb/gadget/udc/lpc32xx_udc.c:1928:6: warning: no previous prototype for 'udc_send_in_zlp' [-Wmissing-prototypes]
    1928 | void udc_send_in_zlp(struct lpc32xx_udc *udc, struct lpc32xx_ep *ep)
quoted
quoted
drivers/usb/gadget/udc/lpc32xx_udc.c:1942:6: warning: no previous prototype for 'udc_handle_eps' [-Wmissing-prototypes]
    1942 | void udc_handle_eps(struct lpc32xx_udc *udc, struct lpc32xx_ep *ep)

This showed up after my commit 792e559e94bc ("udc: lpc32xx: fix 64-bit
compiler warning") made it possible to build the driver on x86-64.

Fix the warning as suggested.

Reported-by: kernel test robot <redacted>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Vladimir Zapolskiy <vz@mleia.com>

--
Best wishes,
Vladimir

Re: [PATCH] udc: lpc32xx: mark local function static

From: Arnd Bergmann <arnd@arndb.de>
Date: 2020-07-06 15:49:05

On Tue, Jun 30, 2020 at 8:32 PM Vladimir Zapolskiy [off-list ref] wrote:
Hi Arnd, thank you for the patch.

On 6/30/20 2:58 PM, Arnd Bergmann wrote:
quoted
The kernel test robot reports two functions that should be marked
static:
quoted
quoted
drivers/usb/gadget/udc/lpc32xx_udc.c:1928:6: warning: no previous prototype for 'udc_send_in_zlp' [-Wmissing-prototypes]
    1928 | void udc_send_in_zlp(struct lpc32xx_udc *udc, struct lpc32xx_ep *ep)
quoted
quoted
drivers/usb/gadget/udc/lpc32xx_udc.c:1942:6: warning: no previous prototype for 'udc_handle_eps' [-Wmissing-prototypes]
    1942 | void udc_handle_eps(struct lpc32xx_udc *udc, struct lpc32xx_ep *ep)

This showed up after my commit 792e559e94bc ("udc: lpc32xx: fix 64-bit
compiler warning") made it possible to build the driver on x86-64.

Fix the warning as suggested.

Reported-by: kernel test robot <redacted>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Vladimir Zapolskiy <vz@mleia.com>
Applied to arm/soc branch now.

     Arnd
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help