linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mukesh Ojha <mojha@codeaurora.org>
To: Yue Haibing <yuehaibing@huawei.com>,
	davem@davemloft.net, mpe@ellerman.id.au, mcgrof@kernel.org
Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH -next] net: pasemi: remove set but not used variable 'cpyhdr'
Date: Thu, 4 Apr 2019 12:56:30 +0530	[thread overview]
Message-ID: <d32d829c-a6fe-9e47-5a00-b73b67fa1b65@codeaurora.org> (raw)
In-Reply-To: <20190403075027.26744-1-yuehaibing@huawei.com>


On 4/3/2019 1:20 PM, Yue Haibing wrote:
> From: YueHaibing <yuehaibing@huawei.com>
>
> Fixes gcc '-Wunused-but-set-variable' warning:
>
> drivers/net/ethernet/pasemi/pasemi_mac.c: In function 'pasemi_mac_queue_csdesc':
> drivers/net/ethernet/pasemi/pasemi_mac.c:1358:29: warning: variable 'cpyhdr' set but not used [-Wunused-but-set-variable]
>
> It's never used since commit 8d636d8bc5ff ("pasemi_mac: jumbo
> frame support") and can be removed.
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>


Reviewed-by: Mukesh Ojha <mojha@codeaurora.org>

Cheers,
-Mukesh

> ---
>   drivers/net/ethernet/pasemi/pasemi_mac.c | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/pasemi/pasemi_mac.c b/drivers/net/ethernet/pasemi/pasemi_mac.c
> index 55d686e..5ffaee9 100644
> --- a/drivers/net/ethernet/pasemi/pasemi_mac.c
> +++ b/drivers/net/ethernet/pasemi/pasemi_mac.c
> @@ -1355,7 +1355,7 @@ static void pasemi_mac_queue_csdesc(const struct sk_buff *skb,
>   	const int nh_off = skb_network_offset(skb);
>   	const int nh_len = skb_network_header_len(skb);
>   	const int nfrags = skb_shinfo(skb)->nr_frags;
> -	int cs_size, i, fill, hdr, cpyhdr, evt;
> +	int cs_size, i, fill, hdr, evt;
>   	dma_addr_t csdma;
>   
>   	fund = XCT_FUN_ST | XCT_FUN_RR_8BRES |
> @@ -1396,7 +1396,6 @@ static void pasemi_mac_queue_csdesc(const struct sk_buff *skb,
>   		fill++;
>   
>   	/* Copy the result into the TCP packet */
> -	cpyhdr = fill;
>   	CS_DESC(csring, fill++) = XCT_FUN_O | XCT_FUN_FUN(csring->fun) |
>   				  XCT_FUN_LLEN(2) | XCT_FUN_SE;
>   	CS_DESC(csring, fill++) = XCT_PTR_LEN(2) | XCT_PTR_ADDR(cs_dest) | XCT_PTR_T;

  reply	other threads:[~2019-04-04  7:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-03  7:50 [PATCH -next] net: pasemi: remove set but not used variable 'cpyhdr' Yue Haibing
2019-04-04  7:26 ` Mukesh Ojha [this message]
2019-04-05  0:37 ` David Miller

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=d32d829c-a6fe-9e47-5a00-b73b67fa1b65@codeaurora.org \
    --to=mojha@codeaurora.org \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mcgrof@kernel.org \
    --cc=mpe@ellerman.id.au \
    --cc=netdev@vger.kernel.org \
    --cc=yuehaibing@huawei.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;
as well as URLs for NNTP newsgroup(s).