Skip to contentSkip to conversation

at91_udc.c: Fix unused variable warning

PATCH New Tom Rini 3 participants 3 messages Apr 19, 2017 – May 16, 2017

Subsystems (2)
lore
Share & tools
lore

Tom Rini

author
#0 lore raw

PATCH 1/1 at91_udc.c: Fix unused variable warning

With gcc-6 and later we see warnings that at91sam9263_udc_caps and at91rm9200_udc_caps are unused.

Fixes 620197670a69 ("usb: gadget: at91_udc: add at91_udc into U-Boot")
Cc Lukasz Majewski <[email protected]>
Cc Marek Vasut <[email protected]>
---
 drivers/usb/gadget/at91_udc.c | 10 ----------
 1 file changed, 10 deletions(-)
drivers/usb/gadget/at91_udc.c +0 -10
index f5bc277fa6e0..01a59078b84a 100644
@@ -1386,11 +1386,6 @@ static void at91rm9200_udc_pullup(struct at91_udc *udc, int is_on)
 		gpio_set_value(udc->board.pullup_pin, !active);
 }
 
-static const struct at91_udc_caps at91rm9200_udc_caps = {
-	.init = at91rm9200_udc_init,
-	.pullup = at91rm9200_udc_pullup,
-};
-
 static int at91sam9260_udc_init(struct at91_udc *udc)
 {
 	struct at91_ep *ep;
@@ -1503,11 +1498,6 @@ static int at91sam9263_udc_init(struct at91_udc *udc)
 	return 0;
 }
 
-static const struct at91_udc_caps at91sam9263_udc_caps = {
-	.init = at91sam9263_udc_init,
-	.pullup = at91sam9260_udc_pullup,
-};
-
 int usb_gadget_handle_interrupts(int index)
 {
 	struct at91_udc *udc = controller;
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/1 at91_udc.c: Fix unused variable warning

Quoted 7 lines · Tom Rini

With gcc-6 and later we see warnings that at91sam9263_udc_caps and at91rm9200_udc_caps are unused.

Fixes 620197670a69 ("usb: gadget: at91_udc: add at91_udc into U-Boot")
Cc Lukasz Majewski <[email protected]>
Cc Marek Vasut <[email protected]>

I'd like Heiko's ACK on this one, since it's his patch which dropped the references. IMO looks OK tho.

Quoted 33 lines
---
 drivers/usb/gadget/at91_udc.c | 10 ----------
 1 file changed, 10 deletions(-)
drivers/usb/gadget/at91_udc.c +0 -10
index f5bc277fa6e0..01a59078b84a 100644
@@ -1386,11 +1386,6 @@ static void at91rm9200_udc_pullup(struct at91_udc *udc, int is_on)
 		gpio_set_value(udc->board.pullup_pin, !active);
 }
 
-static const struct at91_udc_caps at91rm9200_udc_caps = {
-	.init = at91rm9200_udc_init,
-	.pullup = at91rm9200_udc_pullup,
-};
-
 static int at91sam9260_udc_init(struct at91_udc *udc)
 {
 	struct at91_ep *ep;
@@ -1503,11 +1498,6 @@ static int at91sam9263_udc_init(struct at91_udc *udc)
 	return 0;
 }
 
-static const struct at91_udc_caps at91sam9263_udc_caps = {
-	.init = at91sam9263_udc_init,
-	.pullup = at91sam9260_udc_pullup,
-};
-
 int usb_gadget_handle_interrupts(int index)
 {
 	struct at91_udc *udc = controller;
Signature · 2 lines
Best regards,
Marek Vasut
#2 lore raw

PATCH 1/1 at91_udc.c: Fix unused variable warning

In reply to Tom Rini

Hello Tom, Marek,

Am 19.04.2017 um 04:23 schrieb Tom Rini:

Quoted 10 lines

With gcc-6 and later we see warnings that at91sam9263_udc_caps and at91rm9200_udc_caps are unused.

Fixes 620197670a69 ("usb: gadget: at91_udc: add at91_udc into U-Boot")
Cc Lukasz Majewski <[email protected]>
Cc Marek Vasut <[email protected]>
---
  drivers/usb/gadget/at91_udc.c | 10 ----------
  1 file changed, 10 deletions(-)

bye,
Heiko

Quoted 30 lines
drivers/usb/gadget/at91_udc.c +0 -10
index f5bc277fa6e0..01a59078b84a 100644
@@ -1386,11 +1386,6 @@ static void at91rm9200_udc_pullup(struct at91_udc *udc, int is_on)
  		gpio_set_value(udc->board.pullup_pin, !active);
  }
 
-static const struct at91_udc_caps at91rm9200_udc_caps = {
-	.init = at91rm9200_udc_init,
-	.pullup = at91rm9200_udc_pullup,
-};
-
  static int at91sam9260_udc_init(struct at91_udc *udc)
  {
  	struct at91_ep *ep;
@@ -1503,11 +1498,6 @@ static int at91sam9263_udc_init(struct at91_udc *udc)
  	return 0;
  }
 
-static const struct at91_udc_caps at91sam9263_udc_caps = {
-	.init = at91sam9263_udc_init,
-	.pullup = at91sam9260_udc_pullup,
-};
-
  int usb_gadget_handle_interrupts(int index)
  {
  	struct at91_udc *udc = controller;
Signature · 2 lines
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany