All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: dd diasemi <dd.diasemi@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: drivers/regulator/core.c: Fixes mapping inside regulator_mode_to_status() and makes it returning -EINVAL on invalid input.
Date: Tue, 10 Jan 2012 00:14:48 +0000	[thread overview]
Message-ID: <20120110001447.GK30766@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <CAEqHmAtmHjEJUdvkBPhF5PzP4V_xDc5owLJpp0DENsXLs_ynxQ@mail.gmail.com>

On Tue, Jan 10, 2012 at 12:11:33AM +0000, dd diasemi wrote:

> Making regulator_mode_to_status() returning an error allows to
> simplify its usage:
> 	ret = regulator_mode_to_status(regulator_get_mode(rdev));
> 	if (ret < 0)
> 		ret = -EIO;

That code would definitely be less than ideal - if we got an error back
from the attempt to read the mode we ought to be returning that error
not squashing it down to a single value.

  reply	other threads:[~2012-01-10  0:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-09 12:12 drivers/regulator/core.c: Fixes mapping inside regulator_mode_to_status() and makes it returning -EINVAL on invalid input Krystian Garbaciak
2012-01-09 16:14 ` Mark Brown
2012-01-09 19:20   ` dd diasemi
2012-01-09 20:07     ` Mark Brown
2012-01-10  0:11       ` dd diasemi
2012-01-10  0:14         ` Mark Brown [this message]
2012-01-10 17:09           ` dd diasemi
2012-01-10 17:14             ` Mark Brown

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=20120110001447.GK30766@opensource.wolfsonmicro.com \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=dd.diasemi@gmail.com \
    --cc=linux-kernel@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.