All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: rtl8723bs: hal: remove redundant assignment to variable n
@ 2019-07-23 14:59 ` Colin King
  0 siblings, 0 replies; 8+ messages in thread
From: Colin King @ 2019-07-23 14:59 UTC (permalink / raw)
  To: Greg Kroah-Hartman, devel; +Cc: kernel-janitors, linux-kernel

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

The variable n is being assigned a value that is never read, the
assignment is redundant and can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/staging/rtl8723bs/hal/rtl8723bs_recv.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/rtl8723bs/hal/rtl8723bs_recv.c b/drivers/staging/rtl8723bs/hal/rtl8723bs_recv.c
index e23b39ab16c5..032d01834f3f 100644
--- a/drivers/staging/rtl8723bs/hal/rtl8723bs_recv.c
+++ b/drivers/staging/rtl8723bs/hal/rtl8723bs_recv.c
@@ -486,7 +486,6 @@ s32 rtl8723bs_init_recv_priv(struct adapter *padapter)
 	}
 
 	if (precvpriv->pallocated_recv_buf) {
-		n = NR_RECVBUFF * sizeof(struct recv_buf) + 4;
 		kfree(precvpriv->pallocated_recv_buf);
 		precvpriv->pallocated_recv_buf = NULL;
 	}
-- 
2.20.1

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

* [PATCH] staging: rtl8723bs: hal: remove redundant assignment to variable n
@ 2019-07-23 14:59 ` Colin King
  0 siblings, 0 replies; 8+ messages in thread
From: Colin King @ 2019-07-23 14:59 UTC (permalink / raw)
  To: Greg Kroah-Hartman, devel; +Cc: kernel-janitors, linux-kernel

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

The variable n is being assigned a value that is never read, the
assignment is redundant and can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/staging/rtl8723bs/hal/rtl8723bs_recv.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/rtl8723bs/hal/rtl8723bs_recv.c b/drivers/staging/rtl8723bs/hal/rtl8723bs_recv.c
index e23b39ab16c5..032d01834f3f 100644
--- a/drivers/staging/rtl8723bs/hal/rtl8723bs_recv.c
+++ b/drivers/staging/rtl8723bs/hal/rtl8723bs_recv.c
@@ -486,7 +486,6 @@ s32 rtl8723bs_init_recv_priv(struct adapter *padapter)
 	}
 
 	if (precvpriv->pallocated_recv_buf) {
-		n = NR_RECVBUFF * sizeof(struct recv_buf) + 4;
 		kfree(precvpriv->pallocated_recv_buf);
 		precvpriv->pallocated_recv_buf = NULL;
 	}
-- 
2.20.1


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

* [PATCH] staging: rtl8723bs: hal: remove redundant assignment to variable n
@ 2019-09-05 14:15   ` Colin King
  0 siblings, 0 replies; 8+ messages in thread
From: Colin King @ 2019-09-05 14:15 UTC (permalink / raw)
  To: Greg Kroah-Hartman, devel; +Cc: kernel-janitors, linux-kernel

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

The variable n is being assigned a value that is never read, the
assignment is redundant and can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/staging/rtl8723bs/hal/rtl8723bs_recv.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/rtl8723bs/hal/rtl8723bs_recv.c b/drivers/staging/rtl8723bs/hal/rtl8723bs_recv.c
index 032d01834f3f..adfc96d24150 100644
--- a/drivers/staging/rtl8723bs/hal/rtl8723bs_recv.c
+++ b/drivers/staging/rtl8723bs/hal/rtl8723bs_recv.c
@@ -525,7 +525,6 @@ void rtl8723bs_free_recv_priv(struct adapter *padapter)
 	}
 
 	if (precvpriv->pallocated_recv_buf) {
-		n = NR_RECVBUFF * sizeof(struct recv_buf) + 4;
 		kfree(precvpriv->pallocated_recv_buf);
 		precvpriv->pallocated_recv_buf = NULL;
 	}
-- 
2.20.1

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

* [PATCH] staging: rtl8723bs: hal: remove redundant assignment to variable n
@ 2019-09-05 14:15   ` Colin King
  0 siblings, 0 replies; 8+ messages in thread
From: Colin King @ 2019-09-05 14:15 UTC (permalink / raw)
  To: Greg Kroah-Hartman, devel; +Cc: kernel-janitors, linux-kernel

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

The variable n is being assigned a value that is never read, the
assignment is redundant and can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/staging/rtl8723bs/hal/rtl8723bs_recv.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/rtl8723bs/hal/rtl8723bs_recv.c b/drivers/staging/rtl8723bs/hal/rtl8723bs_recv.c
index 032d01834f3f..adfc96d24150 100644
--- a/drivers/staging/rtl8723bs/hal/rtl8723bs_recv.c
+++ b/drivers/staging/rtl8723bs/hal/rtl8723bs_recv.c
@@ -525,7 +525,6 @@ void rtl8723bs_free_recv_priv(struct adapter *padapter)
 	}
 
 	if (precvpriv->pallocated_recv_buf) {
-		n = NR_RECVBUFF * sizeof(struct recv_buf) + 4;
 		kfree(precvpriv->pallocated_recv_buf);
 		precvpriv->pallocated_recv_buf = NULL;
 	}
-- 
2.20.1


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

* Re: [PATCH] staging: rtl8723bs: hal: remove redundant assignment to variable n
  2019-09-05 14:15   ` Colin King
@ 2019-09-05 14:52     ` Dan Carpenter
  -1 siblings, 0 replies; 8+ messages in thread
From: Dan Carpenter @ 2019-09-05 14:52 UTC (permalink / raw)
  To: Colin King; +Cc: devel, Greg Kroah-Hartman, kernel-janitors, linux-kernel

It would be better to remove "n" altogether.

regards,
dan carpenter

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

* Re: [PATCH] staging: rtl8723bs: hal: remove redundant assignment to variable n
@ 2019-09-05 14:52     ` Dan Carpenter
  0 siblings, 0 replies; 8+ messages in thread
From: Dan Carpenter @ 2019-09-05 14:52 UTC (permalink / raw)
  To: Colin King; +Cc: Greg Kroah-Hartman, devel, kernel-janitors, linux-kernel

It would be better to remove "n" altogether.

regards,
dan carpenter


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

* Re: [PATCH] staging: rtl8723bs: hal: remove redundant assignment to variable n
  2019-09-05 14:52     ` Dan Carpenter
@ 2019-09-05 15:02       ` Colin Ian King
  -1 siblings, 0 replies; 8+ messages in thread
From: Colin Ian King @ 2019-09-05 15:02 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: devel, Greg Kroah-Hartman, kernel-janitors, linux-kernel

On 05/09/2019 15:52, Dan Carpenter wrote:
> It would be better to remove "n" altogether.

Good point, will resend a V2 later.
> 
> regards,
> dan carpenter
> 

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

* Re: [PATCH] staging: rtl8723bs: hal: remove redundant assignment to variable n
@ 2019-09-05 15:02       ` Colin Ian King
  0 siblings, 0 replies; 8+ messages in thread
From: Colin Ian King @ 2019-09-05 15:02 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: Greg Kroah-Hartman, devel, kernel-janitors, linux-kernel

On 05/09/2019 15:52, Dan Carpenter wrote:
> It would be better to remove "n" altogether.

Good point, will resend a V2 later.
> 
> regards,
> dan carpenter
> 


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

end of thread, other threads:[~2019-09-05 15:02 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-23 14:59 [PATCH] staging: rtl8723bs: hal: remove redundant assignment to variable n Colin King
2019-07-23 14:59 ` Colin King
2019-09-05 14:15 ` Colin King
2019-09-05 14:15   ` Colin King
2019-09-05 14:52   ` Dan Carpenter
2019-09-05 14:52     ` Dan Carpenter
2019-09-05 15:02     ` Colin Ian King
2019-09-05 15:02       ` Colin Ian King

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.