* [PATCH 2/2] extcon: max14577: Delete an unnecessary variable initialisation in max14577_muic_set_pat
@ 2017-10-22 17:52 SF Markus Elfring
2017-10-22 19:01 ` [PATCH 2/2] extcon: max14577: Delete an unnecessary variable initialisation in max14577_muic_set Krzysztof Kozlowski
2017-10-23 1:05 ` Chanwoo Choi
0 siblings, 2 replies; 3+ messages in thread
From: SF Markus Elfring @ 2017-10-22 17:52 UTC (permalink / raw)
To: kernel-janitors
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sun, 22 Oct 2017 19:39:12 +0200
The variable "ret" is immediately reassigned by a following statement.
Thus omit the explicit initialisation at the beginning.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/extcon/extcon-max14577.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/extcon/extcon-max14577.c b/drivers/extcon/extcon-max14577.c
index 3d4bf5d23236..a2b60742a228 100644
--- a/drivers/extcon/extcon-max14577.c
+++ b/drivers/extcon/extcon-max14577.c
@@ -204,8 +204,8 @@ static int max14577_muic_set_debounce_time(struct max14577_muic_info *info,
static int max14577_muic_set_path(struct max14577_muic_info *info,
u8 val, bool attached)
{
- int ret = 0;
u8 ctrl1, ctrl2 = 0;
+ int ret;
/* Set open state to path before changing hw path */
ret = max14577_update_reg(info->max14577->regmap,
--
2.14.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 2/2] extcon: max14577: Delete an unnecessary variable initialisation in max14577_muic_set
2017-10-22 17:52 [PATCH 2/2] extcon: max14577: Delete an unnecessary variable initialisation in max14577_muic_set_pat SF Markus Elfring
@ 2017-10-22 19:01 ` Krzysztof Kozlowski
2017-10-23 1:05 ` Chanwoo Choi
1 sibling, 0 replies; 3+ messages in thread
From: Krzysztof Kozlowski @ 2017-10-22 19:01 UTC (permalink / raw)
To: kernel-janitors
On Sun, Oct 22, 2017 at 07:52:18PM +0200, SF Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Sun, 22 Oct 2017 19:39:12 +0200
>
> The variable "ret" is immediately reassigned by a following statement.
> Thus omit the explicit initialisation at the beginning.
>
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
> ---
> drivers/extcon/extcon-max14577.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
This should be also sent to linux-kernel@vger.kernel.org - the mailing
list for this subsysten.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 2/2] extcon: max14577: Delete an unnecessary variable initialisation in max14577_muic_set
2017-10-22 17:52 [PATCH 2/2] extcon: max14577: Delete an unnecessary variable initialisation in max14577_muic_set_pat SF Markus Elfring
2017-10-22 19:01 ` [PATCH 2/2] extcon: max14577: Delete an unnecessary variable initialisation in max14577_muic_set Krzysztof Kozlowski
@ 2017-10-23 1:05 ` Chanwoo Choi
1 sibling, 0 replies; 3+ messages in thread
From: Chanwoo Choi @ 2017-10-23 1:05 UTC (permalink / raw)
To: kernel-janitors
On 2017년 10월 23일 02:52, SF Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Sun, 22 Oct 2017 19:39:12 +0200
>
> The variable "ret" is immediately reassigned by a following statement.
> Thus omit the explicit initialisation at the beginning.
>
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
> ---
> drivers/extcon/extcon-max14577.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/extcon/extcon-max14577.c b/drivers/extcon/extcon-max14577.c
> index 3d4bf5d23236..a2b60742a228 100644
> --- a/drivers/extcon/extcon-max14577.c
> +++ b/drivers/extcon/extcon-max14577.c
> @@ -204,8 +204,8 @@ static int max14577_muic_set_debounce_time(struct max14577_muic_info *info,
> static int max14577_muic_set_path(struct max14577_muic_info *info,
> u8 val, bool attached)
> {
> - int ret = 0;
> u8 ctrl1, ctrl2 = 0;
> + int ret;
>
> /* Set open state to path before changing hw path */
> ret = max14577_update_reg(info->max14577->regmap,
>
Applied it. Thanks.
--
Best Regards,
Chanwoo Choi
Samsung Electronics
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-10-23 1:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-22 17:52 [PATCH 2/2] extcon: max14577: Delete an unnecessary variable initialisation in max14577_muic_set_pat SF Markus Elfring
2017-10-22 19:01 ` [PATCH 2/2] extcon: max14577: Delete an unnecessary variable initialisation in max14577_muic_set Krzysztof Kozlowski
2017-10-23 1:05 ` Chanwoo Choi
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.