public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] regulator: tps62360: Remove pointless test for unsigned less than zero
@ 2012-02-07  3:06 Axel Lin
  2012-02-07  9:06 ` Laxman Dewangan
  2012-02-07 11:34 ` Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Axel Lin @ 2012-02-07  3:06 UTC (permalink / raw)
  To: linux-kernel; +Cc: Laxman Dewangan, Liam Girdwood, Mark Brown

The variable 'selector' is a 'unsigned int', so it can never be less than zero.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
 drivers/regulator/tps62360-regulator.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/regulator/tps62360-regulator.c b/drivers/regulator/tps62360-regulator.c
index f778ef0..e2ec730 100644
--- a/drivers/regulator/tps62360-regulator.c
+++ b/drivers/regulator/tps62360-regulator.c
@@ -191,7 +191,7 @@ static int tps62360_dcdc_list_voltage(struct regulator_dev *dev,
 {
 	struct tps62360_chip *tps = rdev_get_drvdata(dev);
 
-	if ((selector < 0) || (selector >= tps->desc.n_voltages))
+	if (selector >= tps->desc.n_voltages)
 		return -EINVAL;
 	return (tps->voltage_base + selector * 10) * 1000;
 }
-- 
1.7.5.4




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

* Re: [PATCH] regulator: tps62360: Remove pointless test for unsigned less than zero
  2012-02-07  3:06 [PATCH] regulator: tps62360: Remove pointless test for unsigned less than zero Axel Lin
@ 2012-02-07  9:06 ` Laxman Dewangan
  2012-02-07 11:34 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Laxman Dewangan @ 2012-02-07  9:06 UTC (permalink / raw)
  To: Axel Lin; +Cc: linux-kernel@vger.kernel.org, Liam Girdwood, Mark Brown

On Tuesday 07 February 2012 08:36 AM, Axel Lin wrote:
> The variable 'selector' is a 'unsigned int', so it can never be less than zero.
>
> Signed-off-by: Axel Lin<axel.lin@gmail.com>
> ---
>

Looks good, Thanks
Acked-by: Laxman Dewangan <ldewangan@nvidia.com>

Laxman

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

* Re: [PATCH] regulator: tps62360: Remove pointless test for unsigned less than zero
  2012-02-07  3:06 [PATCH] regulator: tps62360: Remove pointless test for unsigned less than zero Axel Lin
  2012-02-07  9:06 ` Laxman Dewangan
@ 2012-02-07 11:34 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2012-02-07 11:34 UTC (permalink / raw)
  To: Axel Lin; +Cc: linux-kernel, Laxman Dewangan, Liam Girdwood

[-- Attachment #1: Type: text/plain, Size: 158 bytes --]

On Tue, Feb 07, 2012 at 11:06:20AM +0800, Axel Lin wrote:
> The variable 'selector' is a 'unsigned int', so it can never be less than zero.

Applied, thanks.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

end of thread, other threads:[~2012-02-07 11:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-07  3:06 [PATCH] regulator: tps62360: Remove pointless test for unsigned less than zero Axel Lin
2012-02-07  9:06 ` Laxman Dewangan
2012-02-07 11:34 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox