Linux-mmc Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH -next] mmc: sdhci-milbeaut:  Remove redundant platform_get_irq error message
@ 2020-01-16 14:43 YueHaibing
  2020-01-20  8:42 ` Adrian Hunter
  2020-01-20 11:25 ` Ulf Hansson
  0 siblings, 2 replies; 3+ messages in thread
From: YueHaibing @ 2020-01-16 14:43 UTC (permalink / raw)
  To: adrian.hunter, ulf.hansson, orito.takao
  Cc: linux-mmc, linux-kernel, YueHaibing

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/mmc/host/sdhci-milbeaut.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/mmc/host/sdhci-milbeaut.c b/drivers/mmc/host/sdhci-milbeaut.c
index e6245b7..92f30a1 100644
--- a/drivers/mmc/host/sdhci-milbeaut.c
+++ b/drivers/mmc/host/sdhci-milbeaut.c
@@ -246,10 +246,8 @@ static int sdhci_milbeaut_probe(struct platform_device *pdev)
 	struct f_sdhost_priv *priv;
 
 	irq = platform_get_irq(pdev, 0);
-	if (irq < 0) {
-		dev_err(dev, "%s: no irq specified\n", __func__);
+	if (irq < 0)
 		return irq;
-	}
 
 	host = sdhci_alloc_host(dev, sizeof(struct f_sdhost_priv));
 	if (IS_ERR(host))
-- 
2.7.4



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

* Re: [PATCH -next] mmc: sdhci-milbeaut: Remove redundant platform_get_irq error message
  2020-01-16 14:43 [PATCH -next] mmc: sdhci-milbeaut: Remove redundant platform_get_irq error message YueHaibing
@ 2020-01-20  8:42 ` Adrian Hunter
  2020-01-20 11:25 ` Ulf Hansson
  1 sibling, 0 replies; 3+ messages in thread
From: Adrian Hunter @ 2020-01-20  8:42 UTC (permalink / raw)
  To: YueHaibing, ulf.hansson, orito.takao; +Cc: linux-mmc, linux-kernel

On 16/01/20 4:43 pm, 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>

Acked-by: Adrian Hunter <adrian.hunter@intel.com>

> ---
>  drivers/mmc/host/sdhci-milbeaut.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/mmc/host/sdhci-milbeaut.c b/drivers/mmc/host/sdhci-milbeaut.c
> index e6245b7..92f30a1 100644
> --- a/drivers/mmc/host/sdhci-milbeaut.c
> +++ b/drivers/mmc/host/sdhci-milbeaut.c
> @@ -246,10 +246,8 @@ static int sdhci_milbeaut_probe(struct platform_device *pdev)
>  	struct f_sdhost_priv *priv;
>  
>  	irq = platform_get_irq(pdev, 0);
> -	if (irq < 0) {
> -		dev_err(dev, "%s: no irq specified\n", __func__);
> +	if (irq < 0)
>  		return irq;
> -	}
>  
>  	host = sdhci_alloc_host(dev, sizeof(struct f_sdhost_priv));
>  	if (IS_ERR(host))
> 


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

* Re: [PATCH -next] mmc: sdhci-milbeaut: Remove redundant platform_get_irq error message
  2020-01-16 14:43 [PATCH -next] mmc: sdhci-milbeaut: Remove redundant platform_get_irq error message YueHaibing
  2020-01-20  8:42 ` Adrian Hunter
@ 2020-01-20 11:25 ` Ulf Hansson
  1 sibling, 0 replies; 3+ messages in thread
From: Ulf Hansson @ 2020-01-20 11:25 UTC (permalink / raw)
  To: YueHaibing
  Cc: Adrian Hunter, Takao Orito, linux-mmc, Linux Kernel Mailing List

On Thu, 16 Jan 2020 at 15:43, YueHaibing <yuehaibing@huawei.com> 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>

Applied for next, thanks!

Kind regards
Uffe


> ---
>  drivers/mmc/host/sdhci-milbeaut.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/mmc/host/sdhci-milbeaut.c b/drivers/mmc/host/sdhci-milbeaut.c
> index e6245b7..92f30a1 100644
> --- a/drivers/mmc/host/sdhci-milbeaut.c
> +++ b/drivers/mmc/host/sdhci-milbeaut.c
> @@ -246,10 +246,8 @@ static int sdhci_milbeaut_probe(struct platform_device *pdev)
>         struct f_sdhost_priv *priv;
>
>         irq = platform_get_irq(pdev, 0);
> -       if (irq < 0) {
> -               dev_err(dev, "%s: no irq specified\n", __func__);
> +       if (irq < 0)
>                 return irq;
> -       }
>
>         host = sdhci_alloc_host(dev, sizeof(struct f_sdhost_priv));
>         if (IS_ERR(host))
> --
> 2.7.4
>
>

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

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-16 14:43 [PATCH -next] mmc: sdhci-milbeaut: Remove redundant platform_get_irq error message YueHaibing
2020-01-20  8:42 ` Adrian Hunter
2020-01-20 11:25 ` Ulf Hansson

Linux-mmc Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-mmc/0 linux-mmc/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-mmc linux-mmc/ https://lore.kernel.org/linux-mmc \
		linux-mmc@vger.kernel.org
	public-inbox-index linux-mmc

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-mmc


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git