[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <24836c4f-75b1-75f5-dfb0-2a3007aba458@trained-monkey.org>
Date: Sun, 2 Apr 2023 19:43:02 -0400
From: Jes Sorensen <jes@...ined-monkey.org>
To: Tom Rix <trix@...hat.com>, davem@...emloft.net,
edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com,
nathan@...nel.org, ndesaulniers@...gle.com
Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] net: alteon: remove unused len variable
On 3/31/23 16:55, 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@...hat.com>
Signed-off-by: Jes Sorensen <jes@...ined-monkey.org>
> ---
> 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;
>
Powered by blists - more mailing lists