Skip to contentSkip to conversation

usb: gadget: udc: atmel: remove unused variable 'pp'

PATCH In review Wei Yongjun 2 participants 2 messages Jul 10, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 usb: gadget: udc: atmel: remove unused variable 'pp'

Gcc report build warning as follows:

drivers/usb/gadget/udc/atmel_usba_udc.c:2106:22: warning:
variable pp set but not used [-Wunused-but-set-variable] 2106 | struct device_node *pp;
| ^~

After commit e78355b577c4 ("usb: gadget: udc: atmel: Don't use DT to configure end point"), variable 'pp' is never used, so removing it to avoid warning.

---
 drivers/usb/gadget/udc/atmel_usba_udc.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/usb/gadget/udc/atmel_usba_udc.c +0 -3
index d69f61ff0181..a10b8d406e62 100644
@@ -2103,7 +2103,6 @@ static struct usba_ep * atmel_udc_of_init(struct platform_device *pdev,
 {
 	struct device_node *np = pdev->dev.of_node;
 	const struct of_device_id *match;
-	struct device_node *pp;
 	int i, ret;
 	struct usba_ep *eps, *ep;
 	const struct usba_udc_config *udc_config;
@@ -2128,7 +2127,6 @@ static struct usba_ep * atmel_udc_of_init(struct platform_device *pdev,
 						GPIOD_IN);
 
 	if (fifo_mode == 0) {
-		pp = NULL;
 		udc->num_ep = udc_config->num_ep;
 		udc->configured_ep = 1;
 	} else {
@@ -2144,7 +2142,6 @@ static struct usba_ep * atmel_udc_of_init(struct platform_device *pdev,
 
 	INIT_LIST_HEAD(&eps[0].ep.ep_list);
 
-	pp = NULL;
 	i = 0;
 	while (i < udc->num_ep) {
 		const struct usba_ep_config *ep_cfg = &udc_config->config[i];
#1 lore raw

Hi,

Quoted 9 lines · Wei Yongjun

EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe

Gcc report build warning as follows:

drivers/usb/gadget/udc/atmel_usba_udc.c:2106:22: warning:
variable pp set but not used [-Wunused-but-set-variable] 2106 | struct device_node *pp;
| ^~

This has been also proposed in series with title "[PATCH 00/32] Fix the final bunch of W=1 issues in USB"

Quoted 45 lines

After commit e78355b577c4 ("usb: gadget: udc: atmel: Don't use DT to configure end point"), variable 'pp' is never used, so removing it to avoid warning.

---
 drivers/usb/gadget/udc/atmel_usba_udc.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/usb/gadget/udc/atmel_usba_udc.c +0 -3
index d69f61ff0181..a10b8d406e62 100644
@@ -2103,7 +2103,6 @@ static struct usba_ep * atmel_udc_of_init(struct platform_device *pdev,
 {
        struct device_node *np = pdev->dev.of_node;
        const struct of_device_id *match;
-       struct device_node *pp;
        int i, ret;
        struct usba_ep *eps, *ep;
        const struct usba_udc_config *udc_config;
@@ -2128,7 +2127,6 @@ static struct usba_ep * atmel_udc_of_init(struct platform_device *pdev,
                                                GPIOD_IN);
 
        if (fifo_mode == 0) {
-               pp = NULL;
                udc->num_ep = udc_config->num_ep;
                udc->configured_ep = 1;
        } else {
@@ -2144,7 +2142,6 @@ static struct usba_ep * atmel_udc_of_init(struct platform_device *pdev,
 
        INIT_LIST_HEAD(&eps[0].ep.ep_list);
 
-       pp = NULL;
        i = 0;
        while (i < udc->num_ep) {
                const struct usba_ep_config *ep_cfg = &udc_config->config[i];

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel