linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] regulator: twl6030: fix range comparison, allowing vsel = 59
@ 2017-01-11 15:36 Colin King
  2017-01-19 18:04 ` Applied "regulator: twl6030: fix range comparison, allowing vsel = 59" to the regulator tree Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2017-01-11 15:36 UTC (permalink / raw)
  To: Tony Lindgren, Liam Girdwood, Mark Brown, linux-omap; +Cc: linux-kernel

From: Colin Ian King <colin.king@canonical.com>

The range min_uV > 1350000 && min_uV <= 150000 is never reachable
because of a typo in the previous range check and hence vsel = 59
is never reached.  Fix the previous range check to enable the
vsel = 59 setting.

Fixes CoverityScan CID#728454 ("Logially dead code")

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/regulator/twl6030-regulator.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/regulator/twl6030-regulator.c b/drivers/regulator/twl6030-regulator.c
index 4864b9d..7161910 100644
--- a/drivers/regulator/twl6030-regulator.c
+++ b/drivers/regulator/twl6030-regulator.c
@@ -452,7 +452,7 @@ static int twl6030smps_map_voltage(struct regulator_dev *rdev, int min_uV,
 			vsel = 62;
 		else if ((min_uV > 1800000) && (min_uV <= 1900000))
 			vsel = 61;
-		else if ((min_uV > 1350000) && (min_uV <= 1800000))
+		else if ((min_uV > 1500000) && (min_uV <= 1800000))
 			vsel = 60;
 		else if ((min_uV > 1350000) && (min_uV <= 1500000))
 			vsel = 59;
-- 
2.10.2

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Applied "regulator: twl6030: fix range comparison, allowing vsel = 59" to the regulator tree
  2017-01-11 15:36 [PATCH] regulator: twl6030: fix range comparison, allowing vsel = 59 Colin King
@ 2017-01-19 18:04 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2017-01-19 18:04 UTC (permalink / raw)
  To: Colin Ian King
  Cc: Mark Brown, Tony Lindgren, Liam Girdwood, Mark Brown, linux-omap,
	linux-kernel, linux-kernel

The patch

   regulator: twl6030: fix range comparison, allowing vsel = 59

has been applied to the regulator tree at

   git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

>From b98acbff9a05b371c5f0ca6e44a3af8ce9274379 Mon Sep 17 00:00:00 2001
From: Colin Ian King <colin.king@canonical.com>
Date: Wed, 11 Jan 2017 15:36:20 +0000
Subject: [PATCH] regulator: twl6030: fix range comparison, allowing vsel = 59

The range min_uV > 1350000 && min_uV <= 150000 is never reachable
because of a typo in the previous range check and hence vsel = 59
is never reached.  Fix the previous range check to enable the
vsel = 59 setting.

Fixes CoverityScan CID#728454 ("Logially dead code")

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 drivers/regulator/twl6030-regulator.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/regulator/twl6030-regulator.c b/drivers/regulator/twl6030-regulator.c
index 4864b9d742c0..716191046a70 100644
--- a/drivers/regulator/twl6030-regulator.c
+++ b/drivers/regulator/twl6030-regulator.c
@@ -452,7 +452,7 @@ static int twl6030smps_map_voltage(struct regulator_dev *rdev, int min_uV,
 			vsel = 62;
 		else if ((min_uV > 1800000) && (min_uV <= 1900000))
 			vsel = 61;
-		else if ((min_uV > 1350000) && (min_uV <= 1800000))
+		else if ((min_uV > 1500000) && (min_uV <= 1800000))
 			vsel = 60;
 		else if ((min_uV > 1350000) && (min_uV <= 1500000))
 			vsel = 59;
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-01-19 18:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-11 15:36 [PATCH] regulator: twl6030: fix range comparison, allowing vsel = 59 Colin King
2017-01-19 18:04 ` Applied "regulator: twl6030: fix range comparison, allowing vsel = 59" to the regulator tree Mark Brown

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).