mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/2] regulator: tps65217: Fix build warnings
@ 2014-06-24  8:29 Sachin Kamat
  2014-06-24  8:29 ` [PATCH 2/2] regulator: tps65218: " Sachin Kamat
  2014-06-24 15:23 ` [PATCH 1/2] regulator: tps65217: " Mark Brown
  0 siblings, 2 replies; 4+ messages in thread
From: Sachin Kamat @ 2014-06-24  8:29 UTC (permalink / raw)
  To: linux-kernel; +Cc: lgirdwood, broonie, spk.linux, anilkumar, j-keerthy

rdev_get_id() returns an int. Convert rid to type int to avoid the
following warnings:

drivers/regulator/tps65217-regulator.c:73:10: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
drivers/regulator/tps65217-regulator.c:87:10: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]

Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com>
---
Series compile tested.
---
 drivers/regulator/tps65217-regulator.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/regulator/tps65217-regulator.c b/drivers/regulator/tps65217-regulator.c
index f7ed20a5a8b9..d58db72a63b0 100644
--- a/drivers/regulator/tps65217-regulator.c
+++ b/drivers/regulator/tps65217-regulator.c
@@ -68,7 +68,7 @@ static const struct regulator_linear_range tps65217_uv2_ranges[] = {
 static int tps65217_pmic_enable(struct regulator_dev *dev)
 {
 	struct tps65217 *tps = rdev_get_drvdata(dev);
-	unsigned int rid = rdev_get_id(dev);
+	int rid = rdev_get_id(dev);
 
 	if (rid < TPS65217_DCDC_1 || rid > TPS65217_LDO_4)
 		return -EINVAL;
@@ -82,7 +82,7 @@ static int tps65217_pmic_enable(struct regulator_dev *dev)
 static int tps65217_pmic_disable(struct regulator_dev *dev)
 {
 	struct tps65217 *tps = rdev_get_drvdata(dev);
-	unsigned int rid = rdev_get_id(dev);
+	int rid = rdev_get_id(dev);
 
 	if (rid < TPS65217_DCDC_1 || rid > TPS65217_LDO_4)
 		return -EINVAL;
-- 
1.7.9.5


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

* [PATCH 2/2] regulator: tps65218: Fix build warnings
  2014-06-24  8:29 [PATCH 1/2] regulator: tps65217: Fix build warnings Sachin Kamat
@ 2014-06-24  8:29 ` Sachin Kamat
  2014-06-24 15:25   ` Mark Brown
  2014-06-24 15:23 ` [PATCH 1/2] regulator: tps65217: " Mark Brown
  1 sibling, 1 reply; 4+ messages in thread
From: Sachin Kamat @ 2014-06-24  8:29 UTC (permalink / raw)
  To: linux-kernel; +Cc: lgirdwood, broonie, spk.linux, anilkumar, j-keerthy

rdev_get_id() returns an int. Convert rid to type int to avoid the
following warnings:
drivers/regulator/tps65218-regulator.c:132:10: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
drivers/regulator/tps65218-regulator.c:146:10: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]

Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com>
---
 drivers/regulator/tps65218-regulator.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/regulator/tps65218-regulator.c b/drivers/regulator/tps65218-regulator.c
index 69b4b7750410..8b24404be0bd 100644
--- a/drivers/regulator/tps65218-regulator.c
+++ b/drivers/regulator/tps65218-regulator.c
@@ -127,7 +127,7 @@ static int tps65218_pmic_set_voltage_sel(struct regulator_dev *dev,
 static int tps65218_pmic_enable(struct regulator_dev *dev)
 {
 	struct tps65218 *tps = rdev_get_drvdata(dev);
-	unsigned int rid = rdev_get_id(dev);
+	int rid = rdev_get_id(dev);
 
 	if (rid < TPS65218_DCDC_1 || rid > TPS65218_LDO_1)
 		return -EINVAL;
@@ -141,7 +141,7 @@ static int tps65218_pmic_enable(struct regulator_dev *dev)
 static int tps65218_pmic_disable(struct regulator_dev *dev)
 {
 	struct tps65218 *tps = rdev_get_drvdata(dev);
-	unsigned int rid = rdev_get_id(dev);
+	int rid = rdev_get_id(dev);
 
 	if (rid < TPS65218_DCDC_1 || rid > TPS65218_LDO_1)
 		return -EINVAL;
-- 
1.7.9.5


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

* Re: [PATCH 1/2] regulator: tps65217: Fix build warnings
  2014-06-24  8:29 [PATCH 1/2] regulator: tps65217: Fix build warnings Sachin Kamat
  2014-06-24  8:29 ` [PATCH 2/2] regulator: tps65218: " Sachin Kamat
@ 2014-06-24 15:23 ` Mark Brown
  1 sibling, 0 replies; 4+ messages in thread
From: Mark Brown @ 2014-06-24 15:23 UTC (permalink / raw)
  To: Sachin Kamat; +Cc: linux-kernel, lgirdwood, spk.linux, anilkumar, j-keerthy

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

On Tue, Jun 24, 2014 at 01:59:15PM +0530, Sachin Kamat wrote:
> rdev_get_id() returns an int. Convert rid to type int to avoid the
> following warnings:

Applied, thanks.

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

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

* Re: [PATCH 2/2] regulator: tps65218: Fix build warnings
  2014-06-24  8:29 ` [PATCH 2/2] regulator: tps65218: " Sachin Kamat
@ 2014-06-24 15:25   ` Mark Brown
  0 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2014-06-24 15:25 UTC (permalink / raw)
  To: Sachin Kamat; +Cc: linux-kernel, lgirdwood, spk.linux, anilkumar, j-keerthy

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

On Tue, Jun 24, 2014 at 01:59:16PM +0530, Sachin Kamat wrote:
> rdev_get_id() returns an int. Convert rid to type int to avoid the
> following warnings:
> drivers/regulator/tps65218-regulator.c:132:10: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
> drivers/regulator/tps65218-regulator.c:146:10: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]

Applied, thanks.

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

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

end of thread, other threads:[~2014-06-24 15:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-24  8:29 [PATCH 1/2] regulator: tps65217: Fix build warnings Sachin Kamat
2014-06-24  8:29 ` [PATCH 2/2] regulator: tps65218: " Sachin Kamat
2014-06-24 15:25   ` Mark Brown
2014-06-24 15:23 ` [PATCH 1/2] regulator: tps65217: " Mark Brown

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

all inboxes | Powered by JetHome®