[U-Boot] [PATCH 1/2] drivers, usb, gadget: fix compiler warnings for at91_udc.c

Heiko Schocher hs at denx.de
Thu Jun 22 06:49:19 UTC 2017


fix warnings:
drivers/usb/gadget/at91_udc.c:1344:12: warning: 'at91rm9200_udc_init' defined but not used [-Wunused-function]
drivers/usb/gadget/at91_udc.c:1379:13: warning: 'at91rm9200_udc_pullup' defined but not used [-Wunused-function]
drivers/usb/gadget/at91_udc.c:1476:12: warning: 'at91sam9263_udc_init' defined but not used [-Wunused-function]

Signed-off-by: Heiko Schocher <hs at denx.de>
---

 drivers/usb/gadget/at91_udc.c | 30 +++---------------------------
 1 file changed, 3 insertions(+), 27 deletions(-)

diff --git a/drivers/usb/gadget/at91_udc.c b/drivers/usb/gadget/at91_udc.c
index 01a5907..85bfbf5 100644
--- a/drivers/usb/gadget/at91_udc.c
+++ b/drivers/usb/gadget/at91_udc.c
@@ -1341,7 +1341,7 @@ static int at91_stop(struct usb_gadget *gadget)
 
 /*-------------------------------------------------------------------------*/
 
-static int at91rm9200_udc_init(struct at91_udc *udc)
+static __maybe_unused int at91rm9200_udc_init(struct at91_udc *udc)
 {
 	struct at91_ep *ep;
 	int ret;
@@ -1376,7 +1376,8 @@ static int at91rm9200_udc_init(struct at91_udc *udc)
 	return 0;
 }
 
-static void at91rm9200_udc_pullup(struct at91_udc *udc, int is_on)
+static __maybe_unused
+void at91rm9200_udc_pullup(struct at91_udc *udc, int is_on)
 {
 	int active = !udc->board.pullup_active_low;
 
@@ -1473,31 +1474,6 @@ static const struct at91_udc_caps at91sam9261_udc_caps = {
 };
 #endif
 
-static int at91sam9263_udc_init(struct at91_udc *udc)
-{
-	struct at91_ep *ep;
-	int i;
-
-	for (i = 0; i < NUM_ENDPOINTS; i++) {
-		ep = &udc->ep[i];
-
-		switch (i) {
-		case 0:
-		case 1:
-		case 2:
-		case 3:
-			ep->maxpacket = 64;
-			break;
-		case 4:
-		case 5:
-			ep->maxpacket = 256;
-			break;
-		}
-	}
-
-	return 0;
-}
-
 int usb_gadget_handle_interrupts(int index)
 {
 	struct at91_udc *udc = controller;
-- 
2.7.4



More information about the U-Boot mailing list