Linux on ARM based TI OMAP SoCs
 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 the regulator tree 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

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