public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Nishanth Menon <nm@ti.com>
To: Sachin Kamat <sachin.kamat@linaro.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Mark Brown <broonie@kernel.org>,
	Laxman Dewangan <ldewangan@nvidia.com>, <gg@slimlogic.co.uk>,
	<yong.shen@linaro.org>, Sascha Hauer <s.hauer@pengutronix.de>,
	<marek.vasut@gmail.com>, <Nancy.Chen@freescale.com>
Subject: Re: [PATCH 7/7] regulator: ti-abb: Use devm_regulator_register
Date: Wed, 4 Sep 2013 11:33:13 -0500	[thread overview]
Message-ID: <522760C9.8040201@ti.com> (raw)
In-Reply-To: <CAK9yfHxyyZ8WGL8Q4cJ7Y=LcJ2dkeZamXydnMYS4uOj-cmU_Dg@mail.gmail.com>

On 09/04/2013 11:26 AM, Sachin Kamat wrote:
> Hi  Nishanth,
> 
> On 4 September 2013 18:57, Nishanth Menon <nm@ti.com> wrote:
>> On 09/04/2013 01:31 AM, Sachin Kamat wrote:
>>> -err:
>>> -     dev_err(dev, "%s: Failed to initialize(%d)\n", __func__, ret);
>>> -     return ret;
>> here -> with this, the lazy non detailed prints end with a generic
>> fail case.
> 
> Generally when a driver is converted to use devm_* APIs, the error
> handling code gets
> refactored and simplified as several unwinding calls get removed. The
> above print was similarly removed as part
> of the cleanup and refactoring as it did not add any extra value.
> Probe failure is reported even without this error
> message.
> 

the cleanups here do not have anything to do with devm optimization.
in fact, if we stick with what we have stated to do in this patch,
-	rdev = regulator_register(desc, &config);
+	rdev = devm_regulator_register(dev, desc, &config);
 	if (IS_ERR(rdev)) {
 		ret = PTR_ERR(rdev);
 		dev_err(dev, "%s: failed to register regulator(%d)\n",
 			__func__, ret);
-		goto err;
+		return ret;
 	}

is all we got to do in the probe path.

I accept that probe failure gives me the required info for fail, and
the cleanup of log prints also make sense, just that the log refactor
seems out of context to the specific change.

-- 
Regards,
Nishanth Menon

  reply	other threads:[~2013-09-04 16:34 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-04  6:30 [PATCH 1/7] regulator: anatop-regulator: Use devm_regulator_register Sachin Kamat
2013-09-04  6:30 ` [PATCH 2/7] regulator: isl6271a-regulator: " Sachin Kamat
2013-09-04 14:26   ` Marek Vasut
2013-09-04  6:30 ` [PATCH 3/7] regulator: mc13783: " Sachin Kamat
2013-09-04 14:27   ` Marek Vasut
2013-09-04  6:31 ` [PATCH 4/7] regulator: mc13892: " Sachin Kamat
2013-09-04 14:29   ` Marek Vasut
2013-09-04  6:31 ` [PATCH 5/7] regulator: palmas: " Sachin Kamat
2013-09-04 14:32   ` Marek Vasut
2013-09-04 15:14     ` Sachin Kamat
2013-09-04  6:31 ` [PATCH 6/7] regulator: rc5t583: " Sachin Kamat
2013-09-04 14:33   ` Marek Vasut
2013-09-04  6:31 ` [PATCH 7/7] regulator: ti-abb: " Sachin Kamat
2013-09-04 13:27   ` Nishanth Menon
2013-09-04 15:12     ` Mark Brown
2013-09-04 15:15       ` Nishanth Menon
2013-09-04 16:26     ` Sachin Kamat
2013-09-04 16:33       ` Nishanth Menon [this message]
2013-09-04 16:48         ` Sachin Kamat
2013-09-04 17:00           ` Nishanth Menon
2013-09-04 18:03             ` Mark Brown
2013-09-04  9:49 ` [PATCH 1/7] regulator: anatop-regulator: " Mark Brown
2013-09-04 14:25 ` Marek Vasut

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=522760C9.8040201@ti.com \
    --to=nm@ti.com \
    --cc=Nancy.Chen@freescale.com \
    --cc=broonie@kernel.org \
    --cc=gg@slimlogic.co.uk \
    --cc=ldewangan@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marek.vasut@gmail.com \
    --cc=s.hauer@pengutronix.de \
    --cc=sachin.kamat@linaro.org \
    --cc=yong.shen@linaro.org \
    /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