Skip to contentSkip to conversation

regulator: lp87565: Fix the return value of buck_get_enable function

PATCH New Keerthy 2 participants 8 messages Jun 12, 2017 – Jun 29, 2017

lore
Share & tools
lore

Keerthy

author
#0 lore raw

PATCH v2 1/2 regulator: lp87565: Fix the return value of buck_get_enable function

The function wrongly returned an integer while it is supposed to return boolean. Fix that.

Fixes 2dd9dc02a3("power: regulator: lp87565: add regulator support")
---
 drivers/power/regulator/lp87565_regulator.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/power/regulator/lp87565_regulator.c +1 -1
index 2a0b8ca..e5de578 100644
@@ -174,7 +174,7 @@ static bool buck_get_enable(struct udevice *dev)
 
 	ret = lp87565_buck_enable(dev, PMIC_OP_GET, &enable);
 	if (ret)
-		return ret;
+		return false;
 
 	return enable;
 }
Signature · 1 line
1.9.1
author
#1 lore raw

PATCH v2 2/2 regulator: lp873x: Fix the return value of ldo/buck_get_enable function

The functions wrongly returned an integer while it is supposed to return boolean. Fix that.

Fixes 99785de83 ("power: regulator: lp873x: Add regulator support")

---

Changes in v2:

* Squashed patch 2 and 3 of v1 into 1 patch.

 drivers/power/regulator/lp873x_regulator.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/power/regulator/lp873x_regulator.c +2 -2
index dcb19ff..8c26baf 100644
@@ -263,7 +263,7 @@ static bool ldo_get_enable(struct udevice *dev)
 
 	ret = lp873x_ldo_enable(dev, PMIC_OP_GET, &enable);
 	if (ret)
-		return ret;
+		return false;
 
 	return enable;
 }
@@ -318,7 +318,7 @@ static bool buck_get_enable(struct udevice *dev)
 
 	ret = lp873x_buck_enable(dev, PMIC_OP_GET, &enable);
 	if (ret)
-		return ret;
+		return false;
 
 	return enable;
 }
Signature · 1 line
1.9.1
#2 lore raw

PATCH v2 2/2 regulator: lp873x: Fix the return value of ldo/buck_get_enable function

Quoted 5 lines · Keerthy

The functions wrongly returned an integer while it is supposed to return boolean. Fix that.

Fixes 99785de83 ("power: regulator: lp873x: Add regulator support")

Applied to u-boot-mmc for pmic. Thanks!

Best Regards,
Jaehoon Chung

Quoted 32 lines

---

Changes in v2:

* Squashed patch 2 and 3 of v1 into 1 patch.

 drivers/power/regulator/lp873x_regulator.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/power/regulator/lp873x_regulator.c +2 -2
index dcb19ff..8c26baf 100644
@@ -263,7 +263,7 @@ static bool ldo_get_enable(struct udevice *dev)
 
 	ret = lp873x_ldo_enable(dev, PMIC_OP_GET, &enable);
 	if (ret)
-		return ret;
+		return false;
 
 	return enable;
 }
@@ -318,7 +318,7 @@ static bool buck_get_enable(struct udevice *dev)
 
 	ret = lp873x_buck_enable(dev, PMIC_OP_GET, &enable);
 	if (ret)
-		return ret;
+		return false;
 
 	return enable;
 }
author
#3 lore raw

PATCH v2 2/2 regulator: lp873x: Fix the return value of ldo/buck_get_enable function

Quoted 8 lines · Jaehoon Chung
Quoted 5 lines · Keerthy

The functions wrongly returned an integer while it is supposed to return boolean. Fix that.

Fixes 99785de83 ("power: regulator: lp873x: Add regulator support")

Applied to u-boot-mmc for pmic. Thanks!

Jaehoon,

Oops! This is not needed as per latest discussion here:
https://www.mail-archive.com/u-boot at lists.denx.de/msg253113.html

Regards,
Keerthy

Quoted 37 lines

Best Regards,
Jaehoon Chung

Quoted 32 lines

---

Changes in v2:

* Squashed patch 2 and 3 of v1 into 1 patch.

 drivers/power/regulator/lp873x_regulator.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/power/regulator/lp873x_regulator.c +2 -2
index dcb19ff..8c26baf 100644
@@ -263,7 +263,7 @@ static bool ldo_get_enable(struct udevice *dev)
 
 	ret = lp873x_ldo_enable(dev, PMIC_OP_GET, &enable);
 	if (ret)
-		return ret;
+		return false;
 
 	return enable;
 }
@@ -318,7 +318,7 @@ static bool buck_get_enable(struct udevice *dev)
 
 	ret = lp873x_buck_enable(dev, PMIC_OP_GET, &enable);
 	if (ret)
-		return ret;
+		return false;
 
 	return enable;
 }
#4 lore raw

PATCH v2 1/2 regulator: lp87565: Fix the return value of buck_get_enable function

In reply to Keerthy

Hi,

Quoted 6 lines · Keerthy

The function wrongly returned an integer while it is supposed to return boolean. Fix that.

Fixes 2dd9dc02a3("power: regulator: lp87565: add regulator support")

Applied on u-boot-mmc for PMIC. Thanks!

Best Regards,
Jaehoon Chung

Quoted 18 lines
---
 drivers/power/regulator/lp87565_regulator.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/power/regulator/lp87565_regulator.c +1 -1
index 2a0b8ca..e5de578 100644
@@ -174,7 +174,7 @@ static bool buck_get_enable(struct udevice *dev)
 
 	ret = lp87565_buck_enable(dev, PMIC_OP_GET, &enable);
 	if (ret)
-		return ret;
+		return false;
 
 	return enable;
 }
author
#5 lore raw

PATCH v2 1/2 regulator: lp87565: Fix the return value of buck_get_enable function

Quoted 11 lines · Jaehoon Chung

Hi,

Quoted 6 lines · Keerthy

The function wrongly returned an integer while it is supposed to return boolean. Fix that.

Fixes 2dd9dc02a3("power: regulator: lp87565: add regulator support")

Applied on u-boot-mmc for PMIC. Thanks!

Jaehoon,

Oops! This is not needed as per latest discussion here:
https://www.mail-archive.com/u-boot at lists.denx.de/msg253113.html

Regards,
Keerthy

Quoted 23 lines

Best Regards,
Jaehoon Chung

Quoted 18 lines
---
 drivers/power/regulator/lp87565_regulator.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/power/regulator/lp87565_regulator.c +1 -1
index 2a0b8ca..e5de578 100644
@@ -174,7 +174,7 @@ static bool buck_get_enable(struct udevice *dev)
 
 	ret = lp87565_buck_enable(dev, PMIC_OP_GET, &enable);
 	if (ret)
-		return ret;
+		return false;
 
 	return enable;
 }
#6 lore raw

PATCH v2 1/2 regulator: lp87565: Fix the return value of buck_get_enable function

Hi Keerthy,

Quoted 13 lines · Keerthy
Quoted 10 lines · Jaehoon Chung

Hi,

Quoted 6 lines · Keerthy

The function wrongly returned an integer while it is supposed to return boolean. Fix that.

Fixes 2dd9dc02a3("power: regulator: lp87565: add regulator support")
Quoted 6 lines
Quoted 1 line

Applied on u-boot-mmc for PMIC. Thanks!

Jaehoon,

Oops! This is not needed as per latest discussion here:
https://www.mail-archive.com/u-boot at lists.denx.de/msg253113.html

I read it now..i will push patches to u-boot-mmc without your patch v2. :) I'm doing the build testing now. Thanks!

Best Regards,
Jaehoon Chung

Quoted 30 lines

Regards,
Keerthy

Quoted 23 lines

Best Regards,
Jaehoon Chung

Quoted 18 lines
---
 drivers/power/regulator/lp87565_regulator.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/power/regulator/lp87565_regulator.c +1 -1
index 2a0b8ca..e5de578 100644
@@ -174,7 +174,7 @@ static bool buck_get_enable(struct udevice *dev)
 
 	ret = lp87565_buck_enable(dev, PMIC_OP_GET, &enable);
 	if (ret)
-		return ret;
+		return false;
 
 	return enable;
 }
author
#7 lore raw

PATCH v2 1/2 regulator: lp87565: Fix the return value of buck_get_enable function

Quoted 18 lines · Jaehoon Chung

Hi Keerthy,

Quoted 15 lines · Keerthy
Quoted 11 lines · Jaehoon Chung

Hi,

Quoted 6 lines · Keerthy

The function wrongly returned an integer while it is supposed to return boolean. Fix that.

Fixes 2dd9dc02a3("power: regulator: lp87565: add regulator support")

Applied on u-boot-mmc for PMIC. Thanks!

Quoted 7 lines
Quoted 4 lines

Jaehoon,

Oops! This is not needed as per latest discussion here:
https://www.mail-archive.com/u-boot at lists.denx.de/msg253113.html

I read it now..i will push patches to u-boot-mmc without your patch v2. :) I'm doing the build testing now. Thanks!

Cool Thanks :-)

Quoted 35 lines

Best Regards,
Jaehoon Chung

Quoted 30 lines

Regards,
Keerthy

Quoted 23 lines

Best Regards,
Jaehoon Chung

Quoted 18 lines
---
 drivers/power/regulator/lp87565_regulator.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/power/regulator/lp87565_regulator.c +1 -1
index 2a0b8ca..e5de578 100644
@@ -174,7 +174,7 @@ static bool buck_get_enable(struct udevice *dev)
 
 	ret = lp87565_buck_enable(dev, PMIC_OP_GET, &enable);
 	if (ret)
-		return ret;
+		return false;
 
 	return enable;
 }