netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Petko Manolov <petkan@nucleusys.com>
To: YueHaibing <yuehaibing@huawei.com>
Cc: "David S. Miller" <davem@davemloft.net>,
	linux-usb@vger.kernel.org, netdev@vger.kernel.org,
	kernel-janitors@vger.kernel.org
Subject: Re: [PATCH net-next] net: usb: rtl8150: remove set but not used variable 'rx_stat'
Date: Fri, 18 Jan 2019 16:30:21 +0200	[thread overview]
Message-ID: <20190118143021.GJ29272@p310> (raw)
In-Reply-To: <1547777209-92367-1-git-send-email-yuehaibing@huawei.com>

On 19-01-18 02:06:49, YueHaibing wrote:
> From: Yue Haibing <yuehaibing@huawei.com>
> 
> Fixes gcc '-Wunused-but-set-variable' warning:
> 
> drivers/net/usb/rtl8150.c: In function 'read_bulk_callback':
> drivers/net/usb/rtl8150.c:391:6: warning:
>  variable 'rx_stat' set but not used [-Wunused-but-set-variable]

Good catch, thanks.


		Petko


> Signed-off-by: Yue Haibing <yuehaibing@huawei.com>
> ---
>  drivers/net/usb/rtl8150.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/net/usb/rtl8150.c b/drivers/net/usb/rtl8150.c
> index 80373a9..3f145e4 100644
> --- a/drivers/net/usb/rtl8150.c
> +++ b/drivers/net/usb/rtl8150.c
> @@ -388,7 +388,6 @@ static void read_bulk_callback(struct urb *urb)
>  	unsigned pkt_len, res;
>  	struct sk_buff *skb;
>  	struct net_device *netdev;
> -	u16 rx_stat;
>  	int status = urb->status;
>  	int result;
>  	unsigned long flags;
> @@ -424,7 +423,6 @@ static void read_bulk_callback(struct urb *urb)
>  		goto goon;
>  
>  	res = urb->actual_length;
> -	rx_stat = le16_to_cpu(*(__le16 *)(urb->transfer_buffer + res - 4));
>  	pkt_len = res - 4;
>  
>  	skb_put(dev->rx_skb, pkt_len);
> 
> 
> 
> 

  reply	other threads:[~2019-01-18 14:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-18  2:06 [PATCH net-next] net: usb: rtl8150: remove set but not used variable 'rx_stat' YueHaibing
2019-01-18 14:30 ` Petko Manolov [this message]
2019-01-19 18:30 ` 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=20190118143021.GJ29272@p310 \
    --to=petkan@nucleusys.com \
    --cc=davem@davemloft.net \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --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).