linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] i2c: don't print error when adding adapter fails
@ 2016-08-09 11:36 Wolfram Sang
       [not found] ` <1470742581-12971-2-git-send-email-wsa-dev@sang-engineering.com>
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Wolfram Sang @ 2016-08-09 11:36 UTC (permalink / raw)
  To: linux-arm-kernel

Since v4.8-rc1, the I2C core will print detailed information when adding an I2C
adapter fails. So, drivers can skip this now.

I am still undecided if I apply this as a single patch or break it out. But for
reviewing, avoiding the patch bomb is probably a good thing.

Should go via subsystem tree, I'd think.

Wolfram Sang (1):
  i2c: don't print error when adding adapter fails

 drivers/i2c/busses/i2c-amd756.c         | 5 +----
 drivers/i2c/busses/i2c-at91.c           | 2 --
 drivers/i2c/busses/i2c-axxia.c          | 8 +-------
 drivers/i2c/busses/i2c-bcm-iproc.c      | 8 +-------
 drivers/i2c/busses/i2c-bcm-kona.c       | 4 +---
 drivers/i2c/busses/i2c-bfin-twi.c       | 4 +---
 drivers/i2c/busses/i2c-brcmstb.c        | 4 +---
 drivers/i2c/busses/i2c-cadence.c        | 4 +---
 drivers/i2c/busses/i2c-cpm.c            | 4 +---
 drivers/i2c/busses/i2c-cros-ec-tunnel.c | 4 +---
 drivers/i2c/busses/i2c-davinci.c        | 4 +---
 drivers/i2c/busses/i2c-diolan-u2c.c     | 4 +---
 drivers/i2c/busses/i2c-dln2.c           | 4 +---
 drivers/i2c/busses/i2c-efm32.c          | 1 -
 drivers/i2c/busses/i2c-exynos5.c        | 4 +---
 drivers/i2c/busses/i2c-hix5hd2.c        | 4 +---
 drivers/i2c/busses/i2c-i801.c           | 1 -
 drivers/i2c/busses/i2c-ibm_iic.c        | 4 +---
 drivers/i2c/busses/i2c-img-scb.c        | 4 +---
 drivers/i2c/busses/i2c-imx.c            | 4 +---
 drivers/i2c/busses/i2c-isch.c           | 4 +---
 drivers/i2c/busses/i2c-ismt.c           | 4 +---
 drivers/i2c/busses/i2c-jz4780.c         | 4 +---
 drivers/i2c/busses/i2c-lpc2k.c          | 4 +---
 drivers/i2c/busses/i2c-meson.c          | 1 -
 drivers/i2c/busses/i2c-mpc.c            | 4 +---
 drivers/i2c/busses/i2c-mt65xx.c         | 4 +---
 drivers/i2c/busses/i2c-mxs.c            | 1 -
 drivers/i2c/busses/i2c-nforce2.c        | 1 -
 drivers/i2c/busses/i2c-nomadik.c        | 4 +---
 drivers/i2c/busses/i2c-ocores.c         | 4 +---
 drivers/i2c/busses/i2c-octeon.c         | 4 +---
 drivers/i2c/busses/i2c-omap.c           | 4 +---
 drivers/i2c/busses/i2c-piix4.c          | 1 -
 drivers/i2c/busses/i2c-pmcmsp.c         | 4 +---
 drivers/i2c/busses/i2c-pnx.c            | 4 +---
 drivers/i2c/busses/i2c-puv3.c           | 5 +----
 drivers/i2c/busses/i2c-pxa.c            | 4 +---
 drivers/i2c/busses/i2c-rcar.c           | 4 +---
 drivers/i2c/busses/i2c-riic.c           | 4 +---
 drivers/i2c/busses/i2c-rk3x.c           | 4 +---
 drivers/i2c/busses/i2c-s3c2410.c        | 1 -
 drivers/i2c/busses/i2c-sh7760.c         | 4 +---
 drivers/i2c/busses/i2c-sh_mobile.c      | 1 -
 drivers/i2c/busses/i2c-sirf.c           | 4 +---
 drivers/i2c/busses/i2c-st.c             | 4 +---
 drivers/i2c/busses/i2c-stu300.c         | 5 +----
 drivers/i2c/busses/i2c-tegra.c          | 4 +---
 drivers/i2c/busses/i2c-uniphier-f.c     | 7 +------
 drivers/i2c/busses/i2c-uniphier.c       | 7 +------
 drivers/i2c/busses/i2c-wmt.c            | 4 +---
 drivers/i2c/busses/i2c-xgene-slimpro.c  | 1 -
 drivers/i2c/busses/i2c-xiic.c           | 1 -
 drivers/i2c/busses/i2c-xlp9xx.c         | 4 +---
 drivers/i2c/busses/i2c-xlr.c            | 4 +---
 55 files changed, 44 insertions(+), 161 deletions(-)

-- 
2.8.1

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

* [PATCH] i2c: don't print error when adding adapter fails
       [not found] ` <1470742581-12971-2-git-send-email-wsa-dev@sang-engineering.com>
@ 2016-08-09 13:31   ` Guenter Roeck
  2016-08-09 14:39     ` Wolfram Sang
  0 siblings, 1 reply; 6+ messages in thread
From: Guenter Roeck @ 2016-08-09 13:31 UTC (permalink / raw)
  To: linux-arm-kernel

On 08/09/2016 04:36 AM, Wolfram Sang wrote:
> The core will do this for us now.
>
> Signed-off-by: Wolfram Sang <wsa-dev@sang-engineering.com>
> ---
[ ... ]

> diff --git a/drivers/i2c/busses/i2c-uniphier-f.c b/drivers/i2c/busses/i2c-uniphier-f.c
> index aeead0d27d1007..64318e69089439 100644
> --- a/drivers/i2c/busses/i2c-uniphier-f.c
> +++ b/drivers/i2c/busses/i2c-uniphier-f.c
> @@ -550,15 +550,10 @@ static int uniphier_fi2c_probe(struct platform_device *pdev)
>  	}
>
>  	ret = i2c_add_adapter(&priv->adap);
> -	if (ret) {
> -		dev_err(dev, "failed to add I2C adapter\n");
> -		goto err;
> -	}
> -
> -err:
>  	if (ret)
>  		clk_disable_unprepare(priv->clk);
>
> + err:

You sure about that one ? It leaves the clock enabled in some of the error paths.

>  	return ret;
>  }
>
> diff --git a/drivers/i2c/busses/i2c-uniphier.c b/drivers/i2c/busses/i2c-uniphier.c
> index 475a5eb514e215..94f64cccfdef08 100644
> --- a/drivers/i2c/busses/i2c-uniphier.c
> +++ b/drivers/i2c/busses/i2c-uniphier.c
> @@ -407,15 +407,10 @@ static int uniphier_i2c_probe(struct platform_device *pdev)
>  	}
>
>  	ret = i2c_add_adapter(&priv->adap);
> -	if (ret) {
> -		dev_err(dev, "failed to add I2C adapter\n");
> -		goto err;
> -	}
> -
> -err:
>  	if (ret)
>  		clk_disable_unprepare(priv->clk);
>
> + err:

Same as above.

Note: I dropped all individuals from Cc:; my mailer refused to accept the reply because there
were too many.

Guenter

>  	return ret;
>  }
>

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

* [PATCH] i2c: don't print error when adding adapter fails
  2016-08-09 13:31   ` Guenter Roeck
@ 2016-08-09 14:39     ` Wolfram Sang
  0 siblings, 0 replies; 6+ messages in thread
From: Wolfram Sang @ 2016-08-09 14:39 UTC (permalink / raw)
  To: linux-arm-kernel


> >@@ -550,15 +550,10 @@ static int uniphier_fi2c_probe(struct platform_device *pdev)
> > 	}
> >
> > 	ret = i2c_add_adapter(&priv->adap);
> >-	if (ret) {
> >-		dev_err(dev, "failed to add I2C adapter\n");
> >-		goto err;
> >-	}
> >-
> >-err:
> > 	if (ret)
> > 		clk_disable_unprepare(priv->clk);
> >
> >+ err:
> 
> You sure about that one ? It leaves the clock enabled in some of the error paths.

Uh, ehrm, where is the brown paper bag? Thanks, Guenter!

> Note: I dropped all individuals from Cc:; my mailer refused to accept the reply because there
> were too many.

Yes, the disadvantage of not breaking out.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160809/67eee6cf/attachment.sig>

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

* [PATCH] i2c: don't print error when adding adapter fails
  2016-08-09 11:36 [PATCH] i2c: don't print error when adding adapter fails Wolfram Sang
       [not found] ` <1470742581-12971-2-git-send-email-wsa-dev@sang-engineering.com>
@ 2016-08-09 16:45 ` Joachim Eastwood
  2016-08-10  6:50 ` [STLinux Kernel] " Patrice Chotard
  2016-08-14 22:17 ` Wolfram Sang
  3 siblings, 0 replies; 6+ messages in thread
From: Joachim Eastwood @ 2016-08-09 16:45 UTC (permalink / raw)
  To: linux-arm-kernel

On 9 August 2016 at 13:36, Wolfram Sang <wsa-dev@sang-engineering.com> wrote:
> Since v4.8-rc1, the I2C core will print detailed information when adding an I2C
> adapter fails. So, drivers can skip this now.
>
> I am still undecided if I apply this as a single patch or break it out. But for
> reviewing, avoiding the patch bomb is probably a good thing.
>
> Should go via subsystem tree, I'd think.
>
> Wolfram Sang (1):
>   i2c: don't print error when adding adapter fails


For
>  drivers/i2c/busses/i2c-lpc2k.c          | 4 +---

Acked-by: Joachim Eastwood <manabian@gmail.com>


regards,
Joachim Eastwood

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

* [STLinux Kernel] [PATCH] i2c: don't print error when adding adapter fails
  2016-08-09 11:36 [PATCH] i2c: don't print error when adding adapter fails Wolfram Sang
       [not found] ` <1470742581-12971-2-git-send-email-wsa-dev@sang-engineering.com>
  2016-08-09 16:45 ` Joachim Eastwood
@ 2016-08-10  6:50 ` Patrice Chotard
  2016-08-14 22:17 ` Wolfram Sang
  3 siblings, 0 replies; 6+ messages in thread
From: Patrice Chotard @ 2016-08-10  6:50 UTC (permalink / raw)
  To: linux-arm-kernel

On 08/09/2016 01:36 PM, Wolfram Sang wrote:
> Since v4.8-rc1, the I2C core will print detailed information when adding an I2C
> adapter fails. So, drivers can skip this now.
>
> I am still undecided if I apply this as a single patch or break it out. But for
> reviewing, avoiding the patch bomb is probably a good thing.
>
> Should go via subsystem tree, I'd think.
>
> Wolfram Sang (1):
>   i2c: don't print error when adding adapter fails
>
>  drivers/i2c/busses/i2c-st.c             | 4 +---
>

For i2c-st.c

Acked-by: Patrice Chotard <patrice.chotard@st.com>

Thanks

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

* [PATCH] i2c: don't print error when adding adapter fails
  2016-08-09 11:36 [PATCH] i2c: don't print error when adding adapter fails Wolfram Sang
                   ` (2 preceding siblings ...)
  2016-08-10  6:50 ` [STLinux Kernel] " Patrice Chotard
@ 2016-08-14 22:17 ` Wolfram Sang
  3 siblings, 0 replies; 6+ messages in thread
From: Wolfram Sang @ 2016-08-14 22:17 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Aug 09, 2016 at 01:36:16PM +0200, Wolfram Sang wrote:
> Since v4.8-rc1, the I2C core will print detailed information when adding an I2C
> adapter fails. So, drivers can skip this now.
> 
> I am still undecided if I apply this as a single patch or break it out. But for
> reviewing, avoiding the patch bomb is probably a good thing.
> 
> Should go via subsystem tree, I'd think.
> 
> Wolfram Sang (1):
>   i2c: don't print error when adding adapter fails
> 

Applied to for-next, thanks!

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160815/1ec8f886/attachment.sig>

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

end of thread, other threads:[~2016-08-14 22:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-09 11:36 [PATCH] i2c: don't print error when adding adapter fails Wolfram Sang
     [not found] ` <1470742581-12971-2-git-send-email-wsa-dev@sang-engineering.com>
2016-08-09 13:31   ` Guenter Roeck
2016-08-09 14:39     ` Wolfram Sang
2016-08-09 16:45 ` Joachim Eastwood
2016-08-10  6:50 ` [STLinux Kernel] " Patrice Chotard
2016-08-14 22:17 ` Wolfram Sang

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).