Skip to contentSkip to conversation

usb: gadget: atmel: remove pointless retrieval of DT name property

PATCH New Rob Herring 2 participants 2 messages Aug 29, 2018 – Aug 30, 2018

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

PATCH 1/1 usb: gadget: atmel: remove pointless retrieval of DT name property

The name is always non-NULL and then is not used anywhere in this function, so remove it.

Cc Nicolas Ferre <[email protected]>
Cc Felipe Balbi <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Cc Alexandre Belloni <[email protected]>
Cc linux-arm-kernel at lists.infradead.org
Cc linux-usb at vger.kernel.org
---
 drivers/usb/gadget/udc/atmel_usba_udc.c | 6 ------
 1 file changed, 6 deletions(-)
drivers/usb/gadget/udc/atmel_usba_udc.c +0 -6
index 17147b8c771e..5729935c5eb2 100644
@@ -2004,7 +2004,6 @@ static struct usba_ep * atmel_udc_of_init(struct platform_device *pdev,
 						    struct usba_udc *udc)
 {
 	u32 val;
-	const char *name;
 	struct device_node *np = pdev->dev.of_node;
 	const struct of_device_id *match;
 	struct device_node *pp;
@@ -2094,11 +2093,6 @@ static struct usba_ep * atmel_udc_of_init(struct platform_device *pdev,
 		ep->can_dma = of_property_read_bool(pp, "atmel,can-dma");
 		ep->can_isoc = of_property_read_bool(pp, "atmel,can-isoc");
 
-		ret = of_property_read_string(pp, "name", &name);
-		if (ret) {
-			dev_err(&pdev->dev, "of_probe: name error(%d)\n", ret);
-			goto err;
-		}
 		sprintf(ep->name, "ep%d", ep->index);
 		ep->ep.name = ep->name;
 
Signature · 1 line
2.17.1
maintainer
#1 lore raw

PATCH 1/1 usb: gadget: atmel: remove pointless retrieval of DT name property

Quoted 2 lines · Rob Herring

The name is always non-NULL and then is not used anywhere in this function, so remove it.

Indeed.

Quoted 1 line
Cc Nicolas Ferre <[email protected]>
Quoted 35 lines
Cc Felipe Balbi <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Cc Alexandre Belloni <[email protected]>
Cc linux-arm-kernel at lists.infradead.org
Cc linux-usb at vger.kernel.org
---
  drivers/usb/gadget/udc/atmel_usba_udc.c | 6 ------
  1 file changed, 6 deletions(-)
drivers/usb/gadget/udc/atmel_usba_udc.c +0 -6
index 17147b8c771e..5729935c5eb2 100644
@@ -2004,7 +2004,6 @@ static struct usba_ep * atmel_udc_of_init(struct platform_device *pdev,
  						    struct usba_udc *udc)
  {
  	u32 val;
-	const char *name;
  	struct device_node *np = pdev->dev.of_node;
  	const struct of_device_id *match;
  	struct device_node *pp;
@@ -2094,11 +2093,6 @@ static struct usba_ep * atmel_udc_of_init(struct platform_device *pdev,
  		ep->can_dma = of_property_read_bool(pp, "atmel,can-dma");
  		ep->can_isoc = of_property_read_bool(pp, "atmel,can-isoc");
 
-		ret = of_property_read_string(pp, "name", &name);
-		if (ret) {
-			dev_err(&pdev->dev, "of_probe: name error(%d)\n", ret);
-			goto err;
-		}
  		sprintf(ep->name, "ep%d", ep->index);
  		ep->ep.name = ep->name;
 
Signature · 1 line
Nicolas Ferre