From: Jes Sorensen <jes@trained-monkey.org>
To: Tom Rix <trix@redhat.com>,
davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com, nathan@kernel.org, ndesaulniers@google.com
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] net: alteon: remove unused len variable
Date: Sun, 2 Apr 2023 19:43:02 -0400 [thread overview]
Message-ID: <24836c4f-75b1-75f5-dfb0-2a3007aba458@trained-monkey.org> (raw)
In-Reply-To: <20230331205545.1863496-1-trix@redhat.com>
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@redhat.com>
Signed-off-by: Jes Sorensen <jes@trained-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;
>
prev parent reply other threads:[~2023-04-02 23:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-31 20:55 Tom Rix
2023-04-01 9:12 ` Simon Horman
2023-04-02 12:50 ` patchwork-bot+netdevbpf
2023-04-02 23:43 ` Jes Sorensen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=24836c4f-75b1-75f5-dfb0-2a3007aba458@trained-monkey.org \
--to=jes@trained-monkey.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=trix@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®