* [PATCH net-next] net: ena: removed unused tx_bytes variable
@ 2023-03-28 15:19 Simon Horman
2023-03-28 20:02 ` Shay Agroskin
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Simon Horman @ 2023-03-28 15:19 UTC (permalink / raw)
To: Jakub Kicinski, David S. Miller, Eric Dumazet, Paolo Abeni
Cc: Shay Agroskin, Arthur Kiyanovski, David Arinzon, Noam Dagan,
Saeed Bishara, Tom Rix, netdev
clang 16.0.0 with W=1 reports:
drivers/net/ethernet/amazon/ena/ena_netdev.c:1901:6: error: variable 'tx_bytes' set but not used [-Werror,-Wunused-but-set-variable]
u32 tx_bytes = 0;
The variable is not used so remove it.
Signed-off-by: Simon Horman <horms@kernel.org>
---
drivers/net/ethernet/amazon/ena/ena_netdev.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.c b/drivers/net/ethernet/amazon/ena/ena_netdev.c
index e0588a82c8e5..e6a6efaeb87c 100644
--- a/drivers/net/ethernet/amazon/ena/ena_netdev.c
+++ b/drivers/net/ethernet/amazon/ena/ena_netdev.c
@@ -1898,7 +1898,6 @@ static int ena_clean_xdp_irq(struct ena_ring *xdp_ring, u32 budget)
{
u32 total_done = 0;
u16 next_to_clean;
- u32 tx_bytes = 0;
int tx_pkts = 0;
u16 req_id;
int rc;
@@ -1936,7 +1935,6 @@ static int ena_clean_xdp_irq(struct ena_ring *xdp_ring, u32 budget)
"tx_poll: q %d skb %p completed\n", xdp_ring->qid,
xdpf);
- tx_bytes += xdpf->len;
tx_pkts++;
total_done += tx_info->tx_descs;
--
2.30.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] net: ena: removed unused tx_bytes variable
2023-03-28 15:19 [PATCH net-next] net: ena: removed unused tx_bytes variable Simon Horman
@ 2023-03-28 20:02 ` Shay Agroskin
2023-03-30 5:20 ` patchwork-bot+netdevbpf
2023-03-30 5:21 ` Jakub Kicinski
2 siblings, 0 replies; 4+ messages in thread
From: Shay Agroskin @ 2023-03-28 20:02 UTC (permalink / raw)
To: Simon Horman
Cc: Jakub Kicinski, David S. Miller, Eric Dumazet, Paolo Abeni,
Arthur Kiyanovski, David Arinzon, Noam Dagan, Saeed Bishara,
Tom Rix, netdev
Simon Horman <horms@kernel.org> writes:
> clang 16.0.0 with W=1 reports:
>
> drivers/net/ethernet/amazon/ena/ena_netdev.c:1901:6: error:
> variable 'tx_bytes' set but not used
> [-Werror,-Wunused-but-set-variable]
> u32 tx_bytes = 0;
>
> The variable is not used so remove it.
>
> Signed-off-by: Simon Horman <horms@kernel.org>
> ---
> drivers/net/ethernet/amazon/ena/ena_netdev.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.c
> b/drivers/net/ethernet/amazon/ena/ena_netdev.c
> index e0588a82c8e5..e6a6efaeb87c 100644
> --- a/drivers/net/ethernet/amazon/ena/ena_netdev.c
> +++ b/drivers/net/ethernet/amazon/ena/ena_netdev.c
> @@ -1898,7 +1898,6 @@ static int ena_clean_xdp_irq(struct
> ena_ring *xdp_ring, u32 budget)
> {
> u32 total_done = 0;
> u16 next_to_clean;
> - u32 tx_bytes = 0;
> int tx_pkts = 0;
> u16 req_id;
> int rc;
> @@ -1936,7 +1935,6 @@ static int ena_clean_xdp_irq(struct
> ena_ring *xdp_ring, u32 budget)
> "tx_poll: q %d skb %p completed\n",
> xdp_ring->qid,
> xdpf);
>
> - tx_bytes += xdpf->len;
> tx_pkts++;
> total_done += tx_info->tx_descs;
Thanks for submitting this change.
Acked-by: Shay Agroskin <shayagr@amazon.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] net: ena: removed unused tx_bytes variable
2023-03-28 15:19 [PATCH net-next] net: ena: removed unused tx_bytes variable Simon Horman
2023-03-28 20:02 ` Shay Agroskin
@ 2023-03-30 5:20 ` patchwork-bot+netdevbpf
2023-03-30 5:21 ` Jakub Kicinski
2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-03-30 5:20 UTC (permalink / raw)
To: Simon Horman
Cc: kuba, davem, edumazet, pabeni, shayagr, akiyano, darinzon,
ndagan, saeedb, trix, netdev
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Tue, 28 Mar 2023 17:19:58 +0200 you wrote:
> clang 16.0.0 with W=1 reports:
>
> drivers/net/ethernet/amazon/ena/ena_netdev.c:1901:6: error: variable 'tx_bytes' set but not used [-Werror,-Wunused-but-set-variable]
> u32 tx_bytes = 0;
>
> The variable is not used so remove it.
>
> [...]
Here is the summary with links:
- [net-next] net: ena: removed unused tx_bytes variable
https://git.kernel.org/netdev/net-next/c/c5370374bb1b
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] net: ena: removed unused tx_bytes variable
2023-03-28 15:19 [PATCH net-next] net: ena: removed unused tx_bytes variable Simon Horman
2023-03-28 20:02 ` Shay Agroskin
2023-03-30 5:20 ` patchwork-bot+netdevbpf
@ 2023-03-30 5:21 ` Jakub Kicinski
2 siblings, 0 replies; 4+ messages in thread
From: Jakub Kicinski @ 2023-03-30 5:21 UTC (permalink / raw)
To: Simon Horman
Cc: David S. Miller, Eric Dumazet, Paolo Abeni, Shay Agroskin,
Arthur Kiyanovski, David Arinzon, Noam Dagan, Saeed Bishara,
Tom Rix, netdev
On Tue, 28 Mar 2023 17:19:58 +0200 Simon Horman wrote:
> clang 16.0.0 with W=1 reports:
>
> drivers/net/ethernet/amazon/ena/ena_netdev.c:1901:6: error: variable 'tx_bytes' set but not used [-Werror,-Wunused-but-set-variable]
> u32 tx_bytes = 0;
>
> The variable is not used so remove it.
>
> Signed-off-by: Simon Horman <horms@kernel.org>
Applied, thanks!
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-03-30 5:21 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-28 15:19 [PATCH net-next] net: ena: removed unused tx_bytes variable Simon Horman
2023-03-28 20:02 ` Shay Agroskin
2023-03-30 5:20 ` patchwork-bot+netdevbpf
2023-03-30 5:21 ` 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.