* [PATCH] net: alteon: remove unused len variable
@ 2023-03-31 20:55 Tom Rix
2023-04-01 9:12 ` Simon Horman
2023-04-02 12:50 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Tom Rix @ 2023-03-31 20:55 UTC (permalink / raw)
To: jes, davem, edumazet, kuba, pabeni, nathan, ndesaulniers
Cc: linux-acenic, netdev, linux-kernel, llvm, Tom Rix
clang with W=1 reports
drivers/net/ethernet/alteon/acenic.c:2438:10: error: variable
'len' set but not used [-Werror,-Wunused-but-set-variable]
int i, len = 0;
^
This variable is not used so remove it.
Signed-off-by: Tom Rix <trix@redhat.com>
---
drivers/net/ethernet/alteon/acenic.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/alteon/acenic.c b/drivers/net/ethernet/alteon/acenic.c
index d7762da8b2c0..eafef84fe3be 100644
--- a/drivers/net/ethernet/alteon/acenic.c
+++ b/drivers/net/ethernet/alteon/acenic.c
@@ -2435,7 +2435,7 @@ static netdev_tx_t ace_start_xmit(struct sk_buff *skb,
} else {
dma_addr_t mapping;
u32 vlan_tag = 0;
- int i, len = 0;
+ int i;
mapping = ace_map_tx_skb(ap, skb, NULL, idx);
flagsize = (skb_headlen(skb) << 16);
@@ -2454,7 +2454,6 @@ static netdev_tx_t ace_start_xmit(struct sk_buff *skb,
const skb_frag_t *frag = &skb_shinfo(skb)->frags[i];
struct tx_ring_info *info;
- len += skb_frag_size(frag);
info = ap->skb->tx_skbuff + idx;
desc = ap->tx_ring + idx;
--
2.27.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] net: alteon: remove unused len variable
2023-03-31 20:55 [PATCH] net: alteon: remove unused len variable Tom Rix
@ 2023-04-01 9:12 ` Simon Horman
2023-04-02 12:50 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Simon Horman @ 2023-04-01 9:12 UTC (permalink / raw)
To: Tom Rix
Cc: jes, davem, edumazet, kuba, pabeni, nathan, ndesaulniers,
linux-acenic, netdev, linux-kernel, llvm
On Fri, Mar 31, 2023 at 04:55:45PM -0400, Tom Rix wrote:
> clang with W=1 reports
> drivers/net/ethernet/alteon/acenic.c:2438:10: error: variable
> 'len' set but not used [-Werror,-Wunused-but-set-variable]
> int i, len = 0;
> ^
> This variable is not used so remove it.
>
> Signed-off-by: Tom Rix <trix@redhat.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] net: alteon: remove unused len variable
2023-03-31 20:55 [PATCH] net: alteon: remove unused len variable Tom Rix
2023-04-01 9:12 ` Simon Horman
@ 2023-04-02 12:50 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-04-02 12:50 UTC (permalink / raw)
To: Tom Rix
Cc: jes, davem, edumazet, kuba, pabeni, nathan, ndesaulniers,
linux-acenic, netdev, linux-kernel, llvm
Hello:
This patch was applied to netdev/net-next.git (main)
by David S. Miller <davem@davemloft.net>:
On Fri, 31 Mar 2023 16:55:45 -0400 you wrote:
> clang with W=1 reports
> drivers/net/ethernet/alteon/acenic.c:2438:10: error: variable
> 'len' set but not used [-Werror,-Wunused-but-set-variable]
> int i, len = 0;
> ^
> This variable is not used so remove it.
>
> [...]
Here is the summary with links:
- net: alteon: remove unused len variable
https://git.kernel.org/netdev/net-next/c/51aaa68222d6
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] 3+ messages in thread
end of thread, other threads:[~2023-04-02 12:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-31 20:55 [PATCH] net: alteon: remove unused len variable Tom Rix
2023-04-01 9:12 ` Simon Horman
2023-04-02 12:50 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).