linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] extcon: max77693: Fix return value
@ 2013-03-27 11:23 Sachin Kamat
  2013-03-27 11:23 ` [PATCH 2/2] extcon: max8997: " Sachin Kamat
  2013-03-27 23:21 ` [PATCH 1/2] extcon: max77693: " Chanwoo Choi
  0 siblings, 2 replies; 5+ messages in thread
From: Sachin Kamat @ 2013-03-27 11:23 UTC (permalink / raw)
  To: linux-kernel; +Cc: cw00.choi, myungjoo.ham, sachin.kamat, patches

Return the value obtained from the function instead of hardcoding.
Silences the following warning:
drivers/extcon/extcon-max77693.c:297 max77693_muic_set_path()
info: why not propagate 'ret' from max77693_update_reg() instead of (-11)?
drivers/extcon/extcon-max77693.c:310 max77693_muic_set_path()
info: why not propagate 'ret' from max77693_update_reg() instead of (-11)?

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
 drivers/extcon/extcon-max77693.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/extcon/extcon-max77693.c b/drivers/extcon/extcon-max77693.c
index 8f3c947..894e20e 100644
--- a/drivers/extcon/extcon-max77693.c
+++ b/drivers/extcon/extcon-max77693.c
@@ -294,7 +294,7 @@ static int max77693_muic_set_path(struct max77693_muic_info *info,
 			MAX77693_MUIC_REG_CTRL1, ctrl1, COMP_SW_MASK);
 	if (ret < 0) {
 		dev_err(info->dev, "failed to update MUIC register\n");
-		return -EAGAIN;
+		return ret;
 	}
 
 	if (attached)
@@ -307,7 +307,7 @@ static int max77693_muic_set_path(struct max77693_muic_info *info,
 			CONTROL2_LOWPWR_MASK | CONTROL2_CPEN_MASK);
 	if (ret < 0) {
 		dev_err(info->dev, "failed to update MUIC register\n");
-		return -EAGAIN;
+		return ret;
 	}
 
 	dev_info(info->dev,
-- 
1.7.4.1


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

* [PATCH 2/2] extcon: max8997: Fix return value
  2013-03-27 11:23 [PATCH 1/2] extcon: max77693: Fix return value Sachin Kamat
@ 2013-03-27 11:23 ` Sachin Kamat
  2013-03-27 23:18   ` Chanwoo Choi
  2013-03-27 23:21 ` [PATCH 1/2] extcon: max77693: " Chanwoo Choi
  1 sibling, 1 reply; 5+ messages in thread
From: Sachin Kamat @ 2013-03-27 11:23 UTC (permalink / raw)
  To: linux-kernel; +Cc: cw00.choi, myungjoo.ham, sachin.kamat, patches

Return the value obtained from the function instead of hardcoding.
drivers/extcon/extcon-max8997.c:235 max8997_muic_set_path() info:
why not propagate 'ret' from max8997_update_reg() instead of (-11)?
drivers/extcon/extcon-max8997.c:248 max8997_muic_set_path() info:
why not propagate 'ret' from max8997_update_reg() instead of (-11)?

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
 drivers/extcon/extcon-max8997.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/extcon/extcon-max8997.c b/drivers/extcon/extcon-max8997.c
index 69641bc..05b76b3 100644
--- a/drivers/extcon/extcon-max8997.c
+++ b/drivers/extcon/extcon-max8997.c
@@ -232,7 +232,7 @@ static int max8997_muic_set_path(struct max8997_muic_info *info,
 			MAX8997_MUIC_REG_CONTROL1, ctrl1, COMP_SW_MASK);
 	if (ret < 0) {
 		dev_err(info->dev, "failed to update MUIC register\n");
-		return -EAGAIN;
+		return ret;
 	}
 
 	if (attached)
@@ -245,7 +245,7 @@ static int max8997_muic_set_path(struct max8997_muic_info *info,
 			CONTROL2_LOWPWR_MASK | CONTROL2_CPEN_MASK);
 	if (ret < 0) {
 		dev_err(info->dev, "failed to update MUIC register\n");
-		return -EAGAIN;
+		return ret;
 	}
 
 	dev_info(info->dev,
-- 
1.7.4.1


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

* Re: [PATCH 2/2] extcon: max8997: Fix return value
  2013-03-27 11:23 ` [PATCH 2/2] extcon: max8997: " Sachin Kamat
@ 2013-03-27 23:18   ` Chanwoo Choi
  0 siblings, 0 replies; 5+ messages in thread
From: Chanwoo Choi @ 2013-03-27 23:18 UTC (permalink / raw)
  To: Sachin Kamat; +Cc: linux-kernel, myungjoo.ham, patches

On 03/27/2013 08:23 PM, Sachin Kamat wrote:
> Return the value obtained from the function instead of hardcoding.
> drivers/extcon/extcon-max8997.c:235 max8997_muic_set_path() info:
> why not propagate 'ret' from max8997_update_reg() instead of (-11)?
> drivers/extcon/extcon-max8997.c:248 max8997_muic_set_path() info:
> why not propagate 'ret' from max8997_update_reg() instead of (-11)?
>
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
> ---
>  drivers/extcon/extcon-max8997.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/extcon/extcon-max8997.c b/drivers/extcon/extcon-max8997.c
> index 69641bc..05b76b3 100644
> --- a/drivers/extcon/extcon-max8997.c
> +++ b/drivers/extcon/extcon-max8997.c
> @@ -232,7 +232,7 @@ static int max8997_muic_set_path(struct max8997_muic_info *info,
>  			MAX8997_MUIC_REG_CONTROL1, ctrl1, COMP_SW_MASK);
>  	if (ret < 0) {
>  		dev_err(info->dev, "failed to update MUIC register\n");
> -		return -EAGAIN;
> +		return ret;
>  	}
>  
>  	if (attached)
> @@ -245,7 +245,7 @@ static int max8997_muic_set_path(struct max8997_muic_info *info,
>  			CONTROL2_LOWPWR_MASK | CONTROL2_CPEN_MASK);
>  	if (ret < 0) {
>  		dev_err(info->dev, "failed to update MUIC register\n");
> -		return -EAGAIN;
> +		return ret;
>  	}
>  
>  	dev_info(info->dev,
OK, I agree with your opinion. So, can you fix all of these return type
on extcon-max8997.c? I'd like to receive one patch related
to modification for fixing return type.

Thanks,
Chanwoo Choi


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

* Re: [PATCH 1/2] extcon: max77693: Fix return value
  2013-03-27 11:23 [PATCH 1/2] extcon: max77693: Fix return value Sachin Kamat
  2013-03-27 11:23 ` [PATCH 2/2] extcon: max8997: " Sachin Kamat
@ 2013-03-27 23:21 ` Chanwoo Choi
  2013-03-28  6:41   ` Sachin Kamat
  1 sibling, 1 reply; 5+ messages in thread
From: Chanwoo Choi @ 2013-03-27 23:21 UTC (permalink / raw)
  To: Sachin Kamat; +Cc: linux-kernel, myungjoo.ham, patches

On 03/27/2013 08:23 PM, Sachin Kamat wrote:
> Return the value obtained from the function instead of hardcoding.
> Silences the following warning:
> drivers/extcon/extcon-max77693.c:297 max77693_muic_set_path()
> info: why not propagate 'ret' from max77693_update_reg() instead of (-11)?
> drivers/extcon/extcon-max77693.c:310 max77693_muic_set_path()
> info: why not propagate 'ret' from max77693_update_reg() instead of (-11)?
>
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
> ---
>  drivers/extcon/extcon-max77693.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/extcon/extcon-max77693.c b/drivers/extcon/extcon-max77693.c
> index 8f3c947..894e20e 100644
> --- a/drivers/extcon/extcon-max77693.c
> +++ b/drivers/extcon/extcon-max77693.c
> @@ -294,7 +294,7 @@ static int max77693_muic_set_path(struct max77693_muic_info *info,
>  			MAX77693_MUIC_REG_CTRL1, ctrl1, COMP_SW_MASK);
>  	if (ret < 0) {
>  		dev_err(info->dev, "failed to update MUIC register\n");
> -		return -EAGAIN;
> +		return ret;
>  	}
>  
>  	if (attached)
> @@ -307,7 +307,7 @@ static int max77693_muic_set_path(struct max77693_muic_info *info,
>  			CONTROL2_LOWPWR_MASK | CONTROL2_CPEN_MASK);
>  	if (ret < 0) {
>  		dev_err(info->dev, "failed to update MUIC register\n");
> -		return -EAGAIN;
> +		return ret;
>  	}
>  
>  	dev_info(info->dev,
As my comment about "extcon: max8997: Fix return value",
I wish to receive one patch which modify all of return value with 'ret'
in extcon-max77693.c.

Thanks,
Chanwoo Choi

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

* Re: [PATCH 1/2] extcon: max77693: Fix return value
  2013-03-27 23:21 ` [PATCH 1/2] extcon: max77693: " Chanwoo Choi
@ 2013-03-28  6:41   ` Sachin Kamat
  0 siblings, 0 replies; 5+ messages in thread
From: Sachin Kamat @ 2013-03-28  6:41 UTC (permalink / raw)
  To: Chanwoo Choi; +Cc: linux-kernel, myungjoo.ham, patches

Hi Chanwoo,

On 28 March 2013 04:51, Chanwoo Choi <cw00.choi@samsung.com> wrote:
> On 03/27/2013 08:23 PM, Sachin Kamat wrote:
>> Return the value obtained from the function instead of hardcoding.
>> Silences the following warning:
>> drivers/extcon/extcon-max77693.c:297 max77693_muic_set_path()
>> info: why not propagate 'ret' from max77693_update_reg() instead of (-11)?
>> drivers/extcon/extcon-max77693.c:310 max77693_muic_set_path()
>> info: why not propagate 'ret' from max77693_update_reg() instead of (-11)?
>>
>> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
[snip]

>>       dev_info(info->dev,
> As my comment about "extcon: max8997: Fix return value",
> I wish to receive one patch which modify all of return value with 'ret'
> in extcon-max77693.c.

Resent both patches as per your suggestion.


-- 
With warm regards,
Sachin

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

end of thread, other threads:[~2013-03-28  6:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-27 11:23 [PATCH 1/2] extcon: max77693: Fix return value Sachin Kamat
2013-03-27 11:23 ` [PATCH 2/2] extcon: max8997: " Sachin Kamat
2013-03-27 23:18   ` Chanwoo Choi
2013-03-27 23:21 ` [PATCH 1/2] extcon: max77693: " Chanwoo Choi
2013-03-28  6:41   ` Sachin Kamat

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).