linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] usb: gadget: xudc: Remove redundant platform_get_irq error message
@ 2020-01-16 14:14 YueHaibing
  2020-01-17  4:06 ` Nagarjuna Kristam
  2020-01-17 11:44 ` Thierry Reding
  0 siblings, 2 replies; 3+ messages in thread
From: YueHaibing @ 2020-01-16 14:14 UTC (permalink / raw)
  To: balbi, gregkh, thierry.reding, jonathanh, yuehaibing, nkristam,
	felipe.balbi
  Cc: linux-usb, linux-tegra, linux-kernel

platform_get_irq() will call dev_err() itself on failure,
so there is no need for the driver to also do this.
This is detected by coccinelle.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/usb/gadget/udc/tegra-xudc.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/usb/gadget/udc/tegra-xudc.c b/drivers/usb/gadget/udc/tegra-xudc.c
index 634c2c1..fc1eafc 100644
--- a/drivers/usb/gadget/udc/tegra-xudc.c
+++ b/drivers/usb/gadget/udc/tegra-xudc.c
@@ -3492,11 +3492,8 @@ static int tegra_xudc_probe(struct platform_device *pdev)
 	}
 
 	xudc->irq = platform_get_irq(pdev, 0);
-	if (xudc->irq < 0) {
-		dev_err(xudc->dev, "failed to get IRQ: %d\n",
-				xudc->irq);
+	if (xudc->irq < 0)
 		return xudc->irq;
-	}
 
 	err = devm_request_irq(&pdev->dev, xudc->irq, tegra_xudc_irq, 0,
 			       dev_name(&pdev->dev), xudc);
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH -next] usb: gadget: xudc: Remove redundant platform_get_irq error message
  2020-01-16 14:14 [PATCH -next] usb: gadget: xudc: Remove redundant platform_get_irq error message YueHaibing
@ 2020-01-17  4:06 ` Nagarjuna Kristam
  2020-01-17 11:44 ` Thierry Reding
  1 sibling, 0 replies; 3+ messages in thread
From: Nagarjuna Kristam @ 2020-01-17  4:06 UTC (permalink / raw)
  To: YueHaibing, balbi, gregkh, thierry.reding, jonathanh, felipe.balbi
  Cc: linux-usb, linux-tegra, linux-kernel

Reviewed-by: Nagarjuna Kristam <nkristam@nvidia.com>

On 16-01-2020 19:44, YueHaibing wrote:
> External email: Use caution opening links or attachments
> 
> 
> platform_get_irq() will call dev_err() itself on failure,
> so there is no need for the driver to also do this.
> This is detected by coccinelle.
> 
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
>   drivers/usb/gadget/udc/tegra-xudc.c | 5 +----
>   1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/drivers/usb/gadget/udc/tegra-xudc.c b/drivers/usb/gadget/udc/tegra-xudc.c
> index 634c2c1..fc1eafc 100644
> --- a/drivers/usb/gadget/udc/tegra-xudc.c
> +++ b/drivers/usb/gadget/udc/tegra-xudc.c
> @@ -3492,11 +3492,8 @@ static int tegra_xudc_probe(struct platform_device *pdev)
>          }
> 
>          xudc->irq = platform_get_irq(pdev, 0);
> -       if (xudc->irq < 0) {
> -               dev_err(xudc->dev, "failed to get IRQ: %d\n",
> -                               xudc->irq);
> +       if (xudc->irq < 0)
>                  return xudc->irq;
> -       }
> 
>          err = devm_request_irq(&pdev->dev, xudc->irq, tegra_xudc_irq, 0,
>                                 dev_name(&pdev->dev), xudc);
> --
> 2.7.4
> 
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH -next] usb: gadget: xudc: Remove redundant platform_get_irq error message
  2020-01-16 14:14 [PATCH -next] usb: gadget: xudc: Remove redundant platform_get_irq error message YueHaibing
  2020-01-17  4:06 ` Nagarjuna Kristam
@ 2020-01-17 11:44 ` Thierry Reding
  1 sibling, 0 replies; 3+ messages in thread
From: Thierry Reding @ 2020-01-17 11:44 UTC (permalink / raw)
  To: YueHaibing
  Cc: balbi, gregkh, jonathanh, nkristam, felipe.balbi, linux-usb,
	linux-tegra, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 426 bytes --]

On Thu, Jan 16, 2020 at 10:14:33PM +0800, YueHaibing wrote:
> platform_get_irq() will call dev_err() itself on failure,
> so there is no need for the driver to also do this.
> This is detected by coccinelle.
> 
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
>  drivers/usb/gadget/udc/tegra-xudc.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)

Acked-by: Thierry Reding <treding@nvidia.com>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-01-17 11:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-16 14:14 [PATCH -next] usb: gadget: xudc: Remove redundant platform_get_irq error message YueHaibing
2020-01-17  4:06 ` Nagarjuna Kristam
2020-01-17 11:44 ` Thierry Reding

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).