linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Aishwarya Ramakrishnan <aishwaryarj100@gmail.com>
Cc: linux-arm-kernel@lists.infradead.org,
	Thor Thayer <thor.thayer@linux.intel.com>,
	Hans de Goede <hdegoede@redhat.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Gregory CLEMENT <gregory.clement@bootlin.com>,
	Baruch Siach <baruch@tkos.co.il>,
	Pierre-Yves MORDRET <pierre-yves.mordret@st.com>,
	Vladimir Zapolskiy <vz@mleia.com>,
	Masahiro Yamada <yamada.masahiro@socionext.com>,
	linux-i2c@vger.kernel.org, Dmitry Osipenko <digetx@gmail.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] i2c: drivers: Remove superfluous error message
Date: Mon, 4 May 2020 15:42:56 +0300	[thread overview]
Message-ID: <20200504124256.GF185537@smile.fi.intel.com> (raw)
In-Reply-To: <20200504114408.9128-1-aishwaryarj100@gmail.com>

On Mon, May 04, 2020 at 05:14:06PM +0530, Aishwarya Ramakrishnan wrote:
> The function platform_get_irq can log an error by itself.
> This omit a redundant message for exception handling in the
> calling function.

FWIW,
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>


> Suggested by Coccinelle.

Compile tested only, right?

> 
> Signed-off-by: Aishwarya Ramakrishnan <aishwaryarj100@gmail.com>
> ---
>  drivers/i2c/busses/i2c-altera.c   | 4 +---
>  drivers/i2c/busses/i2c-cht-wc.c   | 4 +---
>  drivers/i2c/busses/i2c-img-scb.c  | 4 +---
>  drivers/i2c/busses/i2c-lpc2k.c    | 4 +---
>  drivers/i2c/busses/i2c-uniphier.c | 4 +---
>  5 files changed, 5 insertions(+), 15 deletions(-)
> 
> diff --git a/drivers/i2c/busses/i2c-altera.c b/drivers/i2c/busses/i2c-altera.c
> index f5c00f903df3..af6985f0ae63 100644
> --- a/drivers/i2c/busses/i2c-altera.c
> +++ b/drivers/i2c/busses/i2c-altera.c
> @@ -395,10 +395,8 @@ static int altr_i2c_probe(struct platform_device *pdev)
>  		return PTR_ERR(idev->base);
>  
>  	irq = platform_get_irq(pdev, 0);
> -	if (irq < 0) {
> -		dev_err(&pdev->dev, "missing interrupt resource\n");
> +	if (irq < 0)
>  		return irq;
> -	}
>  
>  	idev->i2c_clk = devm_clk_get(&pdev->dev, NULL);
>  	if (IS_ERR(idev->i2c_clk)) {
> diff --git a/drivers/i2c/busses/i2c-cht-wc.c b/drivers/i2c/busses/i2c-cht-wc.c
> index 35e55feda763..343ae5754e6e 100644
> --- a/drivers/i2c/busses/i2c-cht-wc.c
> +++ b/drivers/i2c/busses/i2c-cht-wc.c
> @@ -314,10 +314,8 @@ static int cht_wc_i2c_adap_i2c_probe(struct platform_device *pdev)
>  	int ret, reg, irq;
>  
>  	irq = platform_get_irq(pdev, 0);
> -	if (irq < 0) {
> -		dev_err(&pdev->dev, "Error missing irq resource\n");
> +	if (irq < 0)
>  		return -EINVAL;
> -	}
>  
>  	adap = devm_kzalloc(&pdev->dev, sizeof(*adap), GFP_KERNEL);
>  	if (!adap)
> diff --git a/drivers/i2c/busses/i2c-img-scb.c b/drivers/i2c/busses/i2c-img-scb.c
> index 422097a31c95..2f6de763816a 100644
> --- a/drivers/i2c/busses/i2c-img-scb.c
> +++ b/drivers/i2c/busses/i2c-img-scb.c
> @@ -1344,10 +1344,8 @@ static int img_i2c_probe(struct platform_device *pdev)
>  		return PTR_ERR(i2c->base);
>  
>  	irq = platform_get_irq(pdev, 0);
> -	if (irq < 0) {
> -		dev_err(&pdev->dev, "can't get irq number\n");
> +	if (irq < 0)
>  		return irq;
> -	}
>  
>  	i2c->sys_clk = devm_clk_get(&pdev->dev, "sys");
>  	if (IS_ERR(i2c->sys_clk)) {
> diff --git a/drivers/i2c/busses/i2c-lpc2k.c b/drivers/i2c/busses/i2c-lpc2k.c
> index 13b0c12e2dba..43dc9b7043e4 100644
> --- a/drivers/i2c/busses/i2c-lpc2k.c
> +++ b/drivers/i2c/busses/i2c-lpc2k.c
> @@ -362,10 +362,8 @@ static int i2c_lpc2k_probe(struct platform_device *pdev)
>  		return PTR_ERR(i2c->base);
>  
>  	i2c->irq = platform_get_irq(pdev, 0);
> -	if (i2c->irq < 0) {
> -		dev_err(&pdev->dev, "can't get interrupt resource\n");
> +	if (i2c->irq < 0)
>  		return i2c->irq;
> -	}
>  
>  	init_waitqueue_head(&i2c->wait);
>  
> diff --git a/drivers/i2c/busses/i2c-uniphier.c b/drivers/i2c/busses/i2c-uniphier.c
> index 668b1fa2b0ef..ee00a44bf4c7 100644
> --- a/drivers/i2c/busses/i2c-uniphier.c
> +++ b/drivers/i2c/busses/i2c-uniphier.c
> @@ -324,10 +324,8 @@ static int uniphier_i2c_probe(struct platform_device *pdev)
>  		return PTR_ERR(priv->membase);
>  
>  	irq = platform_get_irq(pdev, 0);
> -	if (irq < 0) {
> -		dev_err(dev, "failed to get IRQ number\n");
> +	if (irq < 0)
>  		return irq;
> -	}
>  
>  	if (of_property_read_u32(dev->of_node, "clock-frequency", &bus_speed))
>  		bus_speed = I2C_MAX_STANDARD_MODE_FREQ;
> -- 
> 2.17.1
> 

-- 
With Best Regards,
Andy Shevchenko



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2020-05-04 12:43 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-03 12:08 [PATCH] i2c: uniphier: Remove superfluous error message in uniphier_i2c_probe() Aishwarya Ramakrishnan
2020-05-03 13:29 ` Wolfram Sang
2020-05-04  0:15   ` Masahiro Yamada
2020-05-04 11:44 ` [PATCH] i2c: drivers: Remove superfluous error message Aishwarya Ramakrishnan
2020-05-04 12:42   ` Andy Shevchenko [this message]
2020-05-04 12:44     ` Andy Shevchenko
2020-05-04 14:30   ` Masahiro Yamada
2020-05-05 14:13   ` Wolfram Sang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200504124256.GF185537@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=aishwaryarj100@gmail.com \
    --cc=baruch@tkos.co.il \
    --cc=digetx@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=gregory.clement@bootlin.com \
    --cc=hdegoede@redhat.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pierre-yves.mordret@st.com \
    --cc=tglx@linutronix.de \
    --cc=thor.thayer@linux.intel.com \
    --cc=vz@mleia.com \
    --cc=yamada.masahiro@socionext.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).