linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa@the-dreams.de>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: Christophe JAILLET <christophe.jaillet@wanadoo.fr>,
	linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org,
	kernel-janitors@vger.kernel.org,
	Julia Lawall <julia.lawall@lip6.fr>
Subject: Re: [PATCH] i2c: imx: Remove a useless test in 'i2c_imx_init_recovery_info()'
Date: Fri, 27 Oct 2017 22:08:23 +0200	[thread overview]
Message-ID: <20171027200823.eeltypcwwyuuuvgi@ninjato> (raw)
In-Reply-To: <20170808081501.jxhid5rgfeqpshfw@pengutronix.de>

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

On Tue, Aug 08, 2017 at 10:15:01AM +0200, Uwe Kleine-König wrote:
> On Tue, Aug 08, 2017 at 09:40:59AM +0200, Christophe JAILLET wrote:
> > Le 07/08/2017 à 08:36, Uwe Kleine-König a écrit :
> > > On Mon, Aug 07, 2017 at 01:49:53AM +0200, Christophe JAILLET wrote:
> > > > 'devm_pinctrl_get()' never returns NULL, so this test can be simplified.
> > > That's wrong. If CONFIG_PINCTRL is disabled devm_pinctrl_get returns
> > > NULL. But I think this shouldn't be considered an error, so your change
> > > is right, just the commit log is not.
> > With that said, in fact, I think that the test is correct as is.
> > If CONFIG_PINCTRL is disabled, we will display an info about a missing
> > functionality, but would still continue normally without it (i.e. return
> > PTR_ERR(NULL) = 0 = success), as stated in the comment in front of
> > 'i2c_imx_init_recovery_info':
> >     "These alternative pinmux settings can be described in the device tree
> > by
> >      a separate pinctrl state "gpio". If this is missing this is not a big
> >      problem, the only implication is that we can't do bus recovery."
> > 
> > So, I won't propose any v2 patch with an updated commit log.
> > Feel free to update it yourself and apply it if you don't share my analysis
> > above.
> 
> Then the only issue (maybe?) is that the driver makes use of
> PTR_ERR(NULL) == 0 which I'm not sure is explicitly allowed.

I'll drop this patch for now. If somebody wants this applied, please
send a V2 with the issues here addressed.


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

      reply	other threads:[~2017-10-27 20:08 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-06 23:49 [PATCH] i2c: imx: Remove a useless test in 'i2c_imx_init_recovery_info()' Christophe JAILLET
2017-08-07  6:36 ` Uwe Kleine-König
2017-08-07  7:16   ` Julia Lawall
2017-08-08  6:44     ` Christophe JAILLET
2017-08-08  7:04       ` Julia Lawall
2017-08-08  7:40   ` Christophe JAILLET
2017-08-08  8:15     ` Uwe Kleine-König
2017-10-27 20:08       ` Wolfram Sang [this message]

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=20171027200823.eeltypcwwyuuuvgi@ninjato \
    --to=wsa@the-dreams.de \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=julia.lawall@lip6.fr \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=u.kleine-koenig@pengutronix.de \
    /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).