public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: David Brownell <david-b@pacbell.net>
To: Mark Brown <broonie@sirena.org.uk>,
	Liam Girdwood <lrg@slimlogic.co.uk>,
	lkml <linux-kernel@vger.kernel.org>
Subject: [patch 2.6.30-rc3] regulator: regression fix
Date: Mon, 27 Apr 2009 19:59:40 -0700	[thread overview]
Message-ID: <200904271959.40526.david-b@pacbell.net> (raw)

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>

Revert the "Don't warn on omitted voltage constraints" patch
(3e2b9abda554e9f6105996dca77cca9ef98de17a), which doesn't do
quite what its comments said it was doing.

By removing the "else", it breaks the handling of fixed-voltage
regulators ... turning a non-error/non-warning situation into
a complete init failure, which can then prevent system startup.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
---
You might want to provide a different patch, but ignoring
this regression doesn't seem practical...

 drivers/regulator/core.c |    6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -709,12 +709,8 @@ static int set_machine_constraints(struc
 			cmax = INT_MAX;
 		}
 
-		/* voltage constraints are optional */
-		if ((cmin == 0) && (cmax == 0))
-			goto out;
-
 		/* else require explicit machine-level constraints */
-		if (cmin <= 0 || cmax <= 0 || cmax < cmin) {
+		else if (cmin <= 0 || cmax <= 0 || cmax < cmin) {
 			pr_err("%s: %s '%s' voltage constraints\n",
 				       __func__, "invalid", name);
 			ret = -EINVAL;

             reply	other threads:[~2009-04-28  2:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-28  2:59 David Brownell [this message]
2009-04-28  8:38 ` [patch 2.6.30-rc3] regulator: regression fix Mark Brown
2009-04-28  9:43   ` David Brownell
2009-04-28 10:49     ` 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=200904271959.40526.david-b@pacbell.net \
    --to=david-b@pacbell.net \
    --cc=broonie@sirena.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lrg@slimlogic.co.uk \
    /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