linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Vishwanathrao Badarkhe, Manish" <manishv.b@ti.com>
To: Russell King - ARM Linux <linux@arm.linux.org.uk>
Cc: Tony Lindgren <tony@atomide.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	"davinci-linux-open-source@linux.davincidsp.com" 
	<davinci-linux-open-source@linux.davincidsp.com>,
	"sameo@linux.intel.com" <sameo@linux.intel.com>,
	"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>,
	"khilman@deeprootsystems.com" <khilman@deeprootsystems.com>,
	"devicetree-discuss@lists.ozlabs.org" 
	<devicetree-discuss@lists.ozlabs.org>,
	"broonie@opensource.wolfsonmicro.com" 
	<broonie@opensource.wolfsonmicro.com>,
	"Nori, Sekhar" <nsekhar@ti.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"rob.herring@calxeda.com" <rob.herring@calxeda.com>,
	"hs@denx.de" <hs@denx.de>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>
Subject: RE: [PATCH V2 1/6] pinctrl: pinctrl-single: use arch_initcall and module_exit
Date: Wed, 6 Feb 2013 06:04:22 +0000	[thread overview]
Message-ID: <A4887BF146CD57468F700B415D2F4701583209@DBDE01.ent.ti.com> (raw)
In-Reply-To: <20130205112731.GK17786@n2100.arm.linux.org.uk>

Hi Russell,

On Tue, Feb 05, 2013 at 16:57:31, Russell King - ARM Linux wrote:
> On Tue, Feb 05, 2013 at 06:36:34AM +0000, Vishwanathrao Badarkhe, Manish wrote:
> > I made following changes, in order to update "dip->p" pointer with 
> > correct value:
> > 
> > -       if (!dpi->p) {
> > +       if (IS_ERR_OR_NULL(dpi->p)) {
> >                 dpi->p = devm_pinctrl_get(dev);
> > -               if (IS_ERR_OR_NULL(dpi->p)) {
> > -                       int ret = PTR_ERR(dpi->p);
> > -
> > -                       dev_dbg(dev, "no pinctrl handle\n");
> > -                       /* Only return deferrals */
> > -                       if (ret == -EPROBE_DEFER)
> > -                               return ret;
> > -                       return 0;
> > -               }
> > +               ret = PTR_ERR(dpi->p);
> > +               dev_dbg(dev, "no pinctrl handle\n");
> > +               /* Only return deferrals */
> > +               if (ret == -EPROBE_DEFER)
> > +                       return ret;
> > +               return 0;
> > 
> > Is this intended change?
> 
> The above looks totally broken to me.
> 
> Oh, it's using IS_ERR_OR_NULL(), so it's bound to be broken.
> 

I went through discussion in community on usage of "IS_ERR_OR_NULL".
https://patchwork.kernel.org/patch/1953271/
Will take care not use this in future.

Thanks,
Manish

  reply	other threads:[~2013-02-06  6:04 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-29  7:38 [PATCH V2 0/6] davinci: DT support for i2c0 and tps6507x Vishwanathrao Badarkhe, Manish
2013-01-29  7:38 ` [PATCH V2 1/6] pinctrl: pinctrl-single: use arch_initcall and module_exit Vishwanathrao Badarkhe, Manish
2013-01-29 10:59   ` Linus Walleij
2013-01-29 12:02     ` Vishwanathrao Badarkhe, Manish
2013-02-01  7:05     ` Sekhar Nori
2013-02-01 17:09     ` Tony Lindgren
2013-02-01 17:11       ` Tony Lindgren
2013-02-05  6:36         ` Vishwanathrao Badarkhe, Manish
2013-02-05 11:27           ` Russell King - ARM Linux
2013-02-06  6:04             ` Vishwanathrao Badarkhe, Manish [this message]
2013-02-05 13:00           ` Linus Walleij
2013-02-06  4:57             ` Vishwanathrao Badarkhe, Manish
2013-01-29  7:38 ` [PATCH V2 2/6] ARM: davinci: da850: add OF_DEV_AUXDATA entry for I2C0 Vishwanathrao Badarkhe, Manish
2013-01-29  7:38 ` [PATCH V2 3/6] ARM: davinci: da850: add DT node " Vishwanathrao Badarkhe, Manish
2013-02-03 12:49   ` Sekhar Nori
2013-02-04  3:07     ` Vishwanathrao Badarkhe, Manish
2013-01-29  7:38 ` [PATCH V2 4/6] mfd: tps6507x: add device-tree support Vishwanathrao Badarkhe, Manish
2013-02-03 22:31   ` Samuel Ortiz
2013-01-29  7:38 ` [PATCH V2 5/6] ARM: regulator: add tps6507x device tree data Vishwanathrao Badarkhe, Manish
2013-02-07 10:21   ` Vishwanathrao Badarkhe, Manish
2013-01-29  7:38 ` [PATCH V2 6/6] ARM: davinci: da850: add tps6507x regulator DT data Vishwanathrao Badarkhe, Manish
2013-02-07 10:22   ` Vishwanathrao Badarkhe, Manish

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=A4887BF146CD57468F700B415D2F4701583209@DBDE01.ent.ti.com \
    --to=manishv.b@ti.com \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=davinci-linux-open-source@linux.davincidsp.com \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=hs@denx.de \
    --cc=khilman@deeprootsystems.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=nsekhar@ti.com \
    --cc=rob.herring@calxeda.com \
    --cc=sameo@linux.intel.com \
    --cc=tony@atomide.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).