* [PATCH] net/atheros: remove redundant assignment to variable size
@ 2020-05-08 22:33 ` Colin King
0 siblings, 0 replies; 4+ messages in thread
From: Colin King @ 2020-05-08 22:33 UTC (permalink / raw)
To: Jay Cliburn, Chris Snook, David S . Miller, netdev
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
The variable size is being assigned with a value that is never read,
the assignment is redundant and cab be removed.
Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/net/ethernet/atheros/atlx/atl1.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/atheros/atlx/atl1.c b/drivers/net/ethernet/atheros/atlx/atl1.c
index 271e7034fa70..b35fcfcd692d 100644
--- a/drivers/net/ethernet/atheros/atlx/atl1.c
+++ b/drivers/net/ethernet/atheros/atlx/atl1.c
@@ -1042,7 +1042,7 @@ static s32 atl1_setup_ring_resources(struct atl1_adapter *adapter)
* each ring/block may need up to 8 bytes for alignment, hence the
* additional 40 bytes tacked onto the end.
*/
- ring_header->size = size =
+ ring_header->size =
sizeof(struct tx_packet_desc) * tpd_ring->count
+ sizeof(struct rx_free_desc) * rfd_ring->count
+ sizeof(struct rx_return_desc) * rrd_ring->count
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] net/atheros: remove redundant assignment to variable size
@ 2020-05-08 22:33 ` Colin King
0 siblings, 0 replies; 4+ messages in thread
From: Colin King @ 2020-05-08 22:33 UTC (permalink / raw)
To: Jay Cliburn, Chris Snook, David S . Miller, netdev
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
The variable size is being assigned with a value that is never read,
the assignment is redundant and cab be removed.
Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/net/ethernet/atheros/atlx/atl1.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/atheros/atlx/atl1.c b/drivers/net/ethernet/atheros/atlx/atl1.c
index 271e7034fa70..b35fcfcd692d 100644
--- a/drivers/net/ethernet/atheros/atlx/atl1.c
+++ b/drivers/net/ethernet/atheros/atlx/atl1.c
@@ -1042,7 +1042,7 @@ static s32 atl1_setup_ring_resources(struct atl1_adapter *adapter)
* each ring/block may need up to 8 bytes for alignment, hence the
* additional 40 bytes tacked onto the end.
*/
- ring_header->size = size + ring_header->size sizeof(struct tx_packet_desc) * tpd_ring->count
+ sizeof(struct rx_free_desc) * rfd_ring->count
+ sizeof(struct rx_return_desc) * rrd_ring->count
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] net/atheros: remove redundant assignment to variable size
2020-05-08 22:33 ` Colin King
@ 2020-05-09 5:48 ` Jakub Kicinski
-1 siblings, 0 replies; 4+ messages in thread
From: Jakub Kicinski @ 2020-05-09 5:48 UTC (permalink / raw)
To: Colin King
Cc: Jay Cliburn, Chris Snook, David S . Miller, netdev,
kernel-janitors, linux-kernel
On Fri, 8 May 2020 23:33:21 +0100 Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The variable size is being assigned with a value that is never read,
> the assignment is redundant and cab be removed.
>
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Applied, thank you!
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] net/atheros: remove redundant assignment to variable size
@ 2020-05-09 5:48 ` Jakub Kicinski
0 siblings, 0 replies; 4+ messages in thread
From: Jakub Kicinski @ 2020-05-09 5:48 UTC (permalink / raw)
To: Colin King
Cc: Jay Cliburn, Chris Snook, David S . Miller, netdev,
kernel-janitors, linux-kernel
On Fri, 8 May 2020 23:33:21 +0100 Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The variable size is being assigned with a value that is never read,
> the assignment is redundant and cab be removed.
>
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Applied, thank you!
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-05-09 5:48 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-08 22:33 [PATCH] net/atheros: remove redundant assignment to variable size Colin King
2020-05-08 22:33 ` Colin King
2020-05-09 5:48 ` Jakub Kicinski
2020-05-09 5:48 ` Jakub Kicinski
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.