* [net-next] net: cdc_ncm: remove set but not used variable 'ctx'
@ 2018-10-12 1:49 YueHaibing
0 siblings, 0 replies; 2+ messages in thread
From: YueHaibing @ 2018-10-12 1:49 UTC (permalink / raw)
To: Oliver Neukum, davem; +Cc: YueHaibing, linux-usb, netdev, kernel-janitors
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/net/usb/cdc_ncm.c: In function 'cdc_ncm_status':
drivers/net/usb/cdc_ncm.c:1603:22: warning:
variable 'ctx' set but not used [-Wunused-but-set-variable]
struct cdc_ncm_ctx *ctx;
It not used any more after
commit fa83dbeee558 ("net: cdc_ncm: remove redundant "disconnected" flag")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
drivers/net/usb/cdc_ncm.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/net/usb/cdc_ncm.c b/drivers/net/usb/cdc_ncm.c
index 35a7d61..50c05d0f 100644
--- a/drivers/net/usb/cdc_ncm.c
+++ b/drivers/net/usb/cdc_ncm.c
@@ -1600,11 +1600,8 @@ int cdc_ncm_rx_fixup(struct usbnet *dev, struct sk_buff *skb_in)
static void cdc_ncm_status(struct usbnet *dev, struct urb *urb)
{
- struct cdc_ncm_ctx *ctx;
struct usb_cdc_notification *event;
- ctx = (struct cdc_ncm_ctx *)dev->data[0];
-
if (urb->actual_length < sizeof(*event))
return;
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [net-next] net: cdc_ncm: remove set but not used variable 'ctx'
@ 2018-10-12 16:48 David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2018-10-12 16:48 UTC (permalink / raw)
To: yuehaibing; +Cc: oliver, linux-usb, netdev, kernel-janitors
From: YueHaibing <yuehaibing@huawei.com>
Date: Fri, 12 Oct 2018 01:49:13 +0000
> Fixes gcc '-Wunused-but-set-variable' warning:
>
> drivers/net/usb/cdc_ncm.c: In function 'cdc_ncm_status':
> drivers/net/usb/cdc_ncm.c:1603:22: warning:
> variable 'ctx' set but not used [-Wunused-but-set-variable]
> struct cdc_ncm_ctx *ctx;
>
> It not used any more after
> commit fa83dbeee558 ("net: cdc_ncm: remove redundant "disconnected" flag")
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-10-12 16:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-12 16:48 [net-next] net: cdc_ncm: remove set but not used variable 'ctx' David Miller
-- strict thread matches above, loose matches on Subject: below --
2018-10-12 1:49 YueHaibing
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).