kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] regulator: twl6030: remove redundant range check min_uV > 1300000 && min_uV <= 1350000
@ 2017-03-24 17:13 Colin King
  2017-03-24 19:16 ` Applied "regulator: twl6030: remove redundant range check min_uV > 1300000 && min_uV <= 1350000" to Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2017-03-24 17:13 UTC (permalink / raw)
  To: alban.auzeill, Tony Lindgren, Liam Girdwood, Mark Brown, linux-omap
  Cc: kernel-janitors, linux-kernel

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

It has been pointed out to me that the range for vsel = 58 is actually
dead code as this is covered by an earlier check for (min_uV >= 700000)
&& (min_uV <= 1420000) so remove that check completely.

Reported-by: Alban Auzeill <alban.auzeill@sonarsource.com>
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/regulator/twl6030-regulator.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/regulator/twl6030-regulator.c b/drivers/regulator/twl6030-regulator.c
index 716191046a70..56aada387887 100644
--- a/drivers/regulator/twl6030-regulator.c
+++ b/drivers/regulator/twl6030-regulator.c
@@ -456,8 +456,6 @@ static int twl6030smps_map_voltage(struct regulator_dev *rdev, int min_uV,
 			vsel = 60;
 		else if ((min_uV > 1350000) && (min_uV <= 1500000))
 			vsel = 59;
-		else if ((min_uV > 1300000) && (min_uV <= 1350000))
-			vsel = 58;
 		else
 			return -EINVAL;
 		break;
-- 
2.11.0


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

* Applied "regulator: twl6030: remove redundant range check min_uV > 1300000 && min_uV <= 1350000" to
  2017-03-24 17:13 [PATCH] regulator: twl6030: remove redundant range check min_uV > 1300000 && min_uV <= 1350000 Colin King
@ 2017-03-24 19:16 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2017-03-24 19:16 UTC (permalink / raw)
  To: Colin Ian King; +Cc: Alban Auzeill, Mark Brown

The patch

   regulator: twl6030: remove redundant range check min_uV > 1300000 && min_uV <= 1350000

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 c635df496a5c397fd078b4e72a42e1be79632d7d Mon Sep 17 00:00:00 2001
From: Colin Ian King <colin.king@canonical.com>
Date: Fri, 24 Mar 2017 17:13:50 +0000
Subject: [PATCH] regulator: twl6030: remove redundant range check min_uV >
 1300000 && min_uV <= 1350000

It has been pointed out to me that the range for vsel = 58 is actually
dead code as this is covered by an earlier check for (min_uV >= 700000)
&& (min_uV <= 1420000) so remove that check completely.

Reported-by: Alban Auzeill <alban.auzeill@sonarsource.com>
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, 2 deletions(-)

diff --git a/drivers/regulator/twl6030-regulator.c b/drivers/regulator/twl6030-regulator.c
index 4864b9d742c0..edaf93cc7823 100644
--- a/drivers/regulator/twl6030-regulator.c
+++ b/drivers/regulator/twl6030-regulator.c
@@ -456,8 +456,6 @@ static int twl6030smps_map_voltage(struct regulator_dev *rdev, int min_uV,
 			vsel = 60;
 		else if ((min_uV > 1350000) && (min_uV <= 1500000))
 			vsel = 59;
-		else if ((min_uV > 1300000) && (min_uV <= 1350000))
-			vsel = 58;
 		else
 			return -EINVAL;
 		break;
-- 
2.11.0


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

end of thread, other threads:[~2017-03-24 19:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-24 17:13 [PATCH] regulator: twl6030: remove redundant range check min_uV > 1300000 && min_uV <= 1350000 Colin King
2017-03-24 19:16 ` Applied "regulator: twl6030: remove redundant range check min_uV > 1300000 && min_uV <= 1350000" to 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).