2019-03-30 20:39:38

by Colin King

[permalink] [raw]
Subject: [PATCH] leds: blinkm: clean up double assignment to data->i2c_addr

From: Colin Ian King <[email protected]>

Currently data->i2c_addr is being assigned twice, first with the
value 0x09 and then immediately afterwards with the value 0x08.
The first assignment is redundant and can be removed.

Signed-off-by: Colin Ian King <[email protected]>
---
drivers/leds/leds-blinkm.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/drivers/leds/leds-blinkm.c b/drivers/leds/leds-blinkm.c
index 851c1920b63c..11b771fb933b 100644
--- a/drivers/leds/leds-blinkm.c
+++ b/drivers/leds/leds-blinkm.c
@@ -594,7 +594,6 @@ static int blinkm_probe(struct i2c_client *client,
goto exit;
}

- data->i2c_addr = 0x09;
data->i2c_addr = 0x08;
/* i2c addr - use fake addr of 0x08 initially (real is 0x09) */
data->fw_ver = 0xfe;
--
2.20.1



2019-03-31 07:19:32

by Mukesh Ojha

[permalink] [raw]
Subject: Re: [PATCH] leds: blinkm: clean up double assignment to data->i2c_addr

On 3/31/2019 2:07 AM, Colin King wrote:
> From: Colin Ian King <[email protected]>
>
> Currently data->i2c_addr is being assigned twice, first with the
> value 0x09 and then immediately afterwards with the value 0x08.
> The first assignment is redundant and can be removed.
>
> Signed-off-by: Colin Ian King <[email protected]>
Reviewed-by: Mukesh Ojha <[email protected]>

Cheers,
-Mukesh
> ---
> drivers/leds/leds-blinkm.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/leds/leds-blinkm.c b/drivers/leds/leds-blinkm.c
> index 851c1920b63c..11b771fb933b 100644
> --- a/drivers/leds/leds-blinkm.c
> +++ b/drivers/leds/leds-blinkm.c
> @@ -594,7 +594,6 @@ static int blinkm_probe(struct i2c_client *client,
> goto exit;
> }
>
> - data->i2c_addr = 0x09;
> data->i2c_addr = 0x08;
> /* i2c addr - use fake addr of 0x08 initially (real is 0x09) */
> data->fw_ver = 0xfe;

2019-03-31 18:39:15

by Pavel Machek

[permalink] [raw]
Subject: Re: [PATCH] leds: blinkm: clean up double assignment to data->i2c_addr

On Sat 2019-03-30 20:37:57, Colin King wrote:
> From: Colin Ian King <[email protected]>
>
> Currently data->i2c_addr is being assigned twice, first with the
> value 0x09 and then immediately afterwards with the value 0x08.
> The first assignment is redundant and can be removed.
>
> Signed-off-by: Colin Ian King <[email protected]>

Acked-by: Pavel Machek <[email protected]>

--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html


Attachments:
(No filename) (540.00 B)
signature.asc (188.00 B)
Digital signature
Download all attachments

2019-04-02 19:48:46

by Jacek Anaszewski

[permalink] [raw]
Subject: Re: [PATCH] leds: blinkm: clean up double assignment to data->i2c_addr

Hi Colin,

Thank you for the patch.

On 3/30/19 9:37 PM, Colin King wrote:
> From: Colin Ian King <[email protected]>
>
> Currently data->i2c_addr is being assigned twice, first with the
> value 0x09 and then immediately afterwards with the value 0x08.
> The first assignment is redundant and can be removed.
>
> Signed-off-by: Colin Ian King <[email protected]>
> ---
> drivers/leds/leds-blinkm.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/leds/leds-blinkm.c b/drivers/leds/leds-blinkm.c
> index 851c1920b63c..11b771fb933b 100644
> --- a/drivers/leds/leds-blinkm.c
> +++ b/drivers/leds/leds-blinkm.c
> @@ -594,7 +594,6 @@ static int blinkm_probe(struct i2c_client *client,
> goto exit;
> }
>
> - data->i2c_addr = 0x09;
> data->i2c_addr = 0x08;
> /* i2c addr - use fake addr of 0x08 initially (real is 0x09) */
> data->fw_ver = 0xfe;
>

Applied.

--
Best regards,
Jacek Anaszewski