[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20171027200823.eeltypcwwyuuuvgi@ninjato>
Date: Fri, 27 Oct 2017 22:08:23 +0200
From: Wolfram Sang <wsa@...-dreams.de>
To: Uwe Kleine-König <u.kleine-koenig@...gutronix.de>
Cc: Christophe JAILLET <christophe.jaillet@...adoo.fr>,
linux-i2c@...r.kernel.org, linux-kernel@...r.kernel.org,
kernel-janitors@...r.kernel.org,
Julia Lawall <julia.lawall@...6.fr>
Subject: Re: [PATCH] i2c: imx: Remove a useless test in
'i2c_imx_init_recovery_info()'
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.
Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)
Powered by blists - more mailing lists