From patchwork Fri Oct 12 01:49:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yue Haibing X-Patchwork-Id: 10637707 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 150331869 for ; Fri, 12 Oct 2018 01:38:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 00D7C2BBAA for ; Fri, 12 Oct 2018 01:38:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E93212BC48; Fri, 12 Oct 2018 01:38:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 57ADF2BBAA for ; Fri, 12 Oct 2018 01:38:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726656AbeJLJIL (ORCPT ); Fri, 12 Oct 2018 05:08:11 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:58294 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726280AbeJLJIL (ORCPT ); Fri, 12 Oct 2018 05:08:11 -0400 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id C773C9D782D16; Fri, 12 Oct 2018 09:38:11 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.399.0; Fri, 12 Oct 2018 09:38:02 +0800 From: YueHaibing To: Oliver Neukum , CC: YueHaibing , , , Subject: [PATCH net-next] net: cdc_ncm: remove set but not used variable 'ctx' Date: Fri, 12 Oct 2018 01:49:13 +0000 Message-ID: <1539308953-185007-1-git-send-email-yuehaibing@huawei.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 X-Originating-IP: [10.175.113.25] X-CFilter-Loop: Reflected Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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;