regulator: lp87565: Fix the return value of buck_get_enable function
PATCH 1/3 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.
--- drivers/power/regulator/lp87565_regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/power/regulator/lp87565_regulator.c +1 -1
@@ -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
PATCH 2/3 regulator: lp873x: Fix the return value of ldo_get_enable function
The function wrongly returned an integer while it is supposed to return boolean. Fix that.
--- drivers/power/regulator/lp873x_regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/power/regulator/lp873x_regulator.c +1 -1
@@ -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; }
Signature · 1 line
1.9.1
PATCH 3/3 regulator: lp873x: Fix the return value of buck_get_enable function
In reply to KeerthyThe function wrongly returned an integer while it is supposed to return boolean. Fix that.
--- drivers/power/regulator/lp873x_regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/power/regulator/lp873x_regulator.c +1 -1
@@ -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
PATCH 3/3 regulator: lp873x: Fix the return value of buck_get_enable function
Quoted 15 lines · Keerthy
The function wrongly returned an integer while it is supposed to return boolean. Fix that.
Fixes 99785de83 ("power: regulator: lp873x: Add regulator support")Signed-off-by Keerthy <[email protected]>--- drivers/power/regulator/lp873x_regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/power/regulator/lp873x_regulator.c +0
-0
drivers/power/regulator/lp873x_regulator.c static bool buck_get_enable(struct udevice *dev) · line 324
Quoted 8 lines
drivers/power/regulator/lp873x_regulator.c +1
-1@@ -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; }
just squash 2/3 and 3/3 to a single patch?
Signature · 2 lines
Regards, Nishanth Menon
PATCH 3/3 regulator: lp873x: Fix the return value of buck_get_enable function
Quoted 10 lines · Nishanth Menon
Quoted 9 lines · Keerthy
The function wrongly returned an integer while it is supposed to return boolean. Fix that.
Fixes 99785de83 ("power: regulator: lp873x: Add regulator support")Signed-off-by Keerthy <[email protected]>--- drivers/power/regulator/lp873x_regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 14 lines
drivers/power/regulator/lp873x_regulator.c static bool buck_get_enable(struct udevice *dev) · line 323
Quoted 13 lines
drivers/power/regulator/lp873x_regulator.c +1
-1@@ -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; }just squash 2/3 and 3/3 to a single patch?
Yes. Sent a v2 with both squashed into 1 patch.
Quoted 1 line
PATCH 1/3 regulator: lp87565: Fix the return value of buck_get_enable function
In reply to KeerthyQuoted 9 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")Reported-by Nishanth Menon <[email protected]>Signed-off-by Keerthy <[email protected]>--- drivers/power/regulator/lp87565_regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
PATCH 2/3 regulator: lp873x: Fix the return value of ldo_get_enable function
In reply to KeerthyQuoted 9 lines · Keerthy
The function wrongly returned an integer while it is supposed to return boolean. Fix that.
Fixes 99785de83 ("power: regulator: lp873x: Add regulator support")Signed-off-by Keerthy <[email protected]>--- drivers/power/regulator/lp873x_regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
I think in fact we should return int from this method in struct dm_regulator_ops. I don't really like not being able to return an error.
So bonus points if you can change that :-)
PATCH 2/3 regulator: lp873x: Fix the return value of ldo_get_enable function
Quoted 11 lines · Simon Glass
Quoted 9 lines · Keerthy
The function wrongly returned an integer while it is supposed to return boolean. Fix that.
Fixes 99785de83 ("power: regulator: lp873x: Add regulator support")Signed-off-by Keerthy <[email protected]>--- drivers/power/regulator/lp873x_regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 7 lines
Reviewed-by Simon Glass <[email protected]>I think in fact we should return int from this method in struct
dm_regulator_ops. I don't really like not being able to return an error.So bonus points if you can change that :-)
I did not touch it as it was being used at many places. Seems like that is the right thing to do. I believe this series can be discarded. I will post a series where in all are changed to return int.
Quoted 1 line
PATCH 2/3 regulator: lp873x: Fix the return value of ldo_get_enable function
Quoted 14 lines · Keerthy
Quoted 11 lines · Simon Glass
Quoted 9 lines · Keerthy
The function wrongly returned an integer while it is supposed to return boolean. Fix that.
Fixes 99785de83 ("power: regulator: lp873x: Add regulator support")Signed-off-by Keerthy <[email protected]>--- drivers/power/regulator/lp873x_regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 7 lines
Quoted 7 lines
Reviewed-by Simon Glass <[email protected]>I think in fact we should return int from this method in struct
dm_regulator_ops. I don't really like not being able to return an error.So bonus points if you can change that :-)
Simon,
https://lists.denx.de/pipermail/u-boot/2017-June/295326.html
For changing the return type.
Regards,
Keerthy
Quoted 12 lines
I did not touch it as it was being used at many places. Seems like that is the right thing to do. I believe this series can be discarded. I will post a series where in all are changed to return int.
Quoted 1 line
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
https://lists.denx.de/listinfo/u-boot