All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH][next] staging: wilc1000: remove redundant assignment to variable result
@ 2020-01-14 17:27 ` Colin King
  0 siblings, 0 replies; 5+ messages in thread
From: Colin King @ 2020-01-14 17:27 UTC (permalink / raw)
  To: Adham Abozaeid, Ajay Singh, Greg Kroah-Hartman, linux-wireless, devel
  Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

The variable result is being initialized with a value that
is never read and is being re-assigned later on. The assignment
is redundant and hence can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/staging/wilc1000/spi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/wilc1000/spi.c b/drivers/staging/wilc1000/spi.c
index 55f8757325f0..8694ab5fcb22 100644
--- a/drivers/staging/wilc1000/spi.c
+++ b/drivers/staging/wilc1000/spi.c
@@ -733,7 +733,7 @@ static int spi_internal_read(struct wilc *wilc, u32 adr, u32 *data)
 static int wilc_spi_write_reg(struct wilc *wilc, u32 addr, u32 data)
 {
 	struct spi_device *spi = to_spi_device(wilc->dev);
-	int result = N_OK;
+	int result;
 	u8 cmd = CMD_SINGLE_WRITE;
 	u8 clockless = 0;
 
@@ -782,7 +782,7 @@ static int wilc_spi_write(struct wilc *wilc, u32 addr, u8 *buf, u32 size)
 static int wilc_spi_read_reg(struct wilc *wilc, u32 addr, u32 *data)
 {
 	struct spi_device *spi = to_spi_device(wilc->dev);
-	int result = N_OK;
+	int result;
 	u8 cmd = CMD_SINGLE_READ;
 	u8 clockless = 0;
 
-- 
2.24.0


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

* [PATCH][next] staging: wilc1000: remove redundant assignment to variable result
@ 2020-01-14 17:27 ` Colin King
  0 siblings, 0 replies; 5+ messages in thread
From: Colin King @ 2020-01-14 17:27 UTC (permalink / raw)
  To: Adham Abozaeid, Ajay Singh, Greg Kroah-Hartman, linux-wireless, devel
  Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

The variable result is being initialized with a value that
is never read and is being re-assigned later on. The assignment
is redundant and hence can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/staging/wilc1000/spi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/wilc1000/spi.c b/drivers/staging/wilc1000/spi.c
index 55f8757325f0..8694ab5fcb22 100644
--- a/drivers/staging/wilc1000/spi.c
+++ b/drivers/staging/wilc1000/spi.c
@@ -733,7 +733,7 @@ static int spi_internal_read(struct wilc *wilc, u32 adr, u32 *data)
 static int wilc_spi_write_reg(struct wilc *wilc, u32 addr, u32 data)
 {
 	struct spi_device *spi = to_spi_device(wilc->dev);
-	int result = N_OK;
+	int result;
 	u8 cmd = CMD_SINGLE_WRITE;
 	u8 clockless = 0;
 
@@ -782,7 +782,7 @@ static int wilc_spi_write(struct wilc *wilc, u32 addr, u8 *buf, u32 size)
 static int wilc_spi_read_reg(struct wilc *wilc, u32 addr, u32 *data)
 {
 	struct spi_device *spi = to_spi_device(wilc->dev);
-	int result = N_OK;
+	int result;
 	u8 cmd = CMD_SINGLE_READ;
 	u8 clockless = 0;
 
-- 
2.24.0

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* Re: [PATCH][next] staging: wilc1000: remove redundant assignment to variable result
  2020-01-14 17:27 ` Colin King
  (?)
@ 2020-01-16 11:08   ` Claudiu.Beznea
  -1 siblings, 0 replies; 5+ messages in thread
From: Claudiu.Beznea @ 2020-01-16 11:08 UTC (permalink / raw)
  To: colin.king, Adham.Abozaeid, Ajay.Kathat, gregkh, linux-wireless, devel
  Cc: kernel-janitors, linux-kernel



On 14.01.2020 19:27, Colin King wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> From: Colin Ian King <colin.king@canonical.com>
> 
> The variable result is being initialized with a value that
> is never read and is being re-assigned later on. The assignment
> is redundant and hence can be removed.
> 
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>

> ---
>  drivers/staging/wilc1000/spi.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/wilc1000/spi.c b/drivers/staging/wilc1000/spi.c
> index 55f8757325f0..8694ab5fcb22 100644
> --- a/drivers/staging/wilc1000/spi.c
> +++ b/drivers/staging/wilc1000/spi.c
> @@ -733,7 +733,7 @@ static int spi_internal_read(struct wilc *wilc, u32 adr, u32 *data)
>  static int wilc_spi_write_reg(struct wilc *wilc, u32 addr, u32 data)
>  {
>         struct spi_device *spi = to_spi_device(wilc->dev);
> -       int result = N_OK;
> +       int result;
>         u8 cmd = CMD_SINGLE_WRITE;
>         u8 clockless = 0;
> 
> @@ -782,7 +782,7 @@ static int wilc_spi_write(struct wilc *wilc, u32 addr, u8 *buf, u32 size)
>  static int wilc_spi_read_reg(struct wilc *wilc, u32 addr, u32 *data)
>  {
>         struct spi_device *spi = to_spi_device(wilc->dev);
> -       int result = N_OK;
> +       int result;
>         u8 cmd = CMD_SINGLE_READ;
>         u8 clockless = 0;
> 
> --
> 2.24.0
> 
> 

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

* Re: [PATCH][next] staging: wilc1000: remove redundant assignment to variable result
@ 2020-01-16 11:08   ` Claudiu.Beznea
  0 siblings, 0 replies; 5+ messages in thread
From: Claudiu.Beznea @ 2020-01-16 11:08 UTC (permalink / raw)
  To: colin.king, Adham.Abozaeid, Ajay.Kathat, gregkh, linux-wireless, devel
  Cc: kernel-janitors, linux-kernel

DQoNCk9uIDE0LjAxLjIwMjAgMTk6MjcsIENvbGluIEtpbmcgd3JvdGU6DQo+IEVYVEVSTkFMIEVN
QUlMOiBEbyBub3QgY2xpY2sgbGlua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zMz
LDcgKzczMyw3IEBAIHN0YXRpYyBpbnQgc3BpX2ludGVybmFsX3JlYWQoc3RydWN0IHdpbGMgKndp
bGMsIHUzMiBhZHIsIHUzMiAqZGF0YSkNCj4gIHN0YXRpYyBpbnQgd2lsY19zcGlfd3JpdGVfcmVn
KHN0cnVjdCB3aWxjICp3aWxjLCB1MzIgYWRkciwgdTMyIGRhdGEpDQo+ICB7DQo+ICAgICAgICAg
c3RydWN0IHNwaV9kZXZpY2UgKnNwaSA9IHRvX3NwaV9kZXZpY2Uod2lsYy0+ZGV2KTsNCj4gLSAg
ICAgICBpbnQgcmVzdWx0ID0gTl9PSzsNCj4gKyAgICAgICBpbnQgcmVzdWx0Ow0KPiAgICAgICAg
IHU4IGNtZCA9IENNRF9TSU5HTEVfV1JJVEU7DQo+ICAgICAgICAgdTggY2xvY2tsZXNzID0gMDsN
Cj4gDQo+IEBAIC03ODIsNyArNzgyLDcgQEAgc3RhdGljIGludCB3aWxjX3NwaV93cml0ZShzdHJ1
Y3Qgd2lsYyAqd2lsYywgdTMyIGFkZHIsIHU4ICpidWYsIHUzMiBzaXplKQ0KPiAgc3RhdGljIGlu
dCB3aWxjX3NwaV9yZWFkX3JlZyhzdHJ1Y3Qgd2lsYyAqd2lsYywgdTMyIGFkZHIsIHUzMiAqZGF0
YSkNCj4gIHsNCj4gICAgICAgICBzdHJ1Y3Qgc3BpX2RldmljZSAqc3BpID0gdG9fc3BpX2Rldmlj
ZSh3aWxjLT5kZXYpOw0KPiAtICAgICAgIGludCByZXN1bHQgPSBOX09LOw0KPiArICAgICAgIGlu
dCByZXN1bHQ7DQo+ICAgICAgICAgdTggY21kID0gQ01EX1NJTkdMRV9SRUFEOw0KPiAgICAgICAg
IHU4IGNsb2NrbGVzcyA9IDA7DQo+IA0KPiAtLQ0KPiAyLjI0LjANCj4gDQo+IA=

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

* Re: [PATCH][next] staging: wilc1000: remove redundant assignment to variable result
@ 2020-01-16 11:08   ` Claudiu.Beznea
  0 siblings, 0 replies; 5+ messages in thread
From: Claudiu.Beznea @ 2020-01-16 11:08 UTC (permalink / raw)
  To: colin.king, Adham.Abozaeid, Ajay.Kathat, gregkh, linux-wireless, devel
  Cc: kernel-janitors, linux-kernel



On 14.01.2020 19:27, Colin King wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> From: Colin Ian King <colin.king@canonical.com>
> 
> The variable result is being initialized with a value that
> is never read and is being re-assigned later on. The assignment
> is redundant and hence can be removed.
> 
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>

> ---
>  drivers/staging/wilc1000/spi.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/wilc1000/spi.c b/drivers/staging/wilc1000/spi.c
> index 55f8757325f0..8694ab5fcb22 100644
> --- a/drivers/staging/wilc1000/spi.c
> +++ b/drivers/staging/wilc1000/spi.c
> @@ -733,7 +733,7 @@ static int spi_internal_read(struct wilc *wilc, u32 adr, u32 *data)
>  static int wilc_spi_write_reg(struct wilc *wilc, u32 addr, u32 data)
>  {
>         struct spi_device *spi = to_spi_device(wilc->dev);
> -       int result = N_OK;
> +       int result;
>         u8 cmd = CMD_SINGLE_WRITE;
>         u8 clockless = 0;
> 
> @@ -782,7 +782,7 @@ static int wilc_spi_write(struct wilc *wilc, u32 addr, u8 *buf, u32 size)
>  static int wilc_spi_read_reg(struct wilc *wilc, u32 addr, u32 *data)
>  {
>         struct spi_device *spi = to_spi_device(wilc->dev);
> -       int result = N_OK;
> +       int result;
>         u8 cmd = CMD_SINGLE_READ;
>         u8 clockless = 0;
> 
> --
> 2.24.0
> 
> 
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

end of thread, other threads:[~2020-01-16 11:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-14 17:27 [PATCH][next] staging: wilc1000: remove redundant assignment to variable result Colin King
2020-01-14 17:27 ` Colin King
2020-01-16 11:08 ` Claudiu.Beznea
2020-01-16 11:08   ` Claudiu.Beznea
2020-01-16 11:08   ` Claudiu.Beznea

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.