From patchwork Sat Sep 22 06:31:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yue Haibing X-Patchwork-Id: 10611317 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 EB3B95A4 for ; Sat, 22 Sep 2018 06:22:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C5CA52D50A for ; Sat, 22 Sep 2018 06:22:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B78452D50D; Sat, 22 Sep 2018 06:22:14 +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 5C65B2D50A for ; Sat, 22 Sep 2018 06:22:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725860AbeIVMOa (ORCPT ); Sat, 22 Sep 2018 08:14:30 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:35119 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725837AbeIVMOa (ORCPT ); Sat, 22 Sep 2018 08:14:30 -0400 Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 7FF602087762E; Sat, 22 Sep 2018 14:22:04 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS412-HUB.china.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.399.0; Sat, 22 Sep 2018 14:21:57 +0800 From: YueHaibing To: Greg Kroah-Hartman , Daniel Drake , Joe Perches , Alan Stern , Mathias Nyman , Felipe Balbi , Martin Liu CC: YueHaibing , , Subject: [PATCH -next] USB: core: remove set but not used variable 'udev' Date: Sat, 22 Sep 2018 06:31:26 +0000 Message-ID: <1537597886-136734-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/usb/core/driver.c: In function 'usb_driver_claim_interface': drivers/usb/core/driver.c:513:21: warning: variable 'udev' set but not used [-Wunused-but-set-variable] Signed-off-by: YueHaibing Acked-by: Alan Stern --- drivers/usb/core/driver.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/usb/core/driver.c b/drivers/usb/core/driver.c index a1f225f..5356438 100644 --- a/drivers/usb/core/driver.c +++ b/drivers/usb/core/driver.c @@ -510,7 +510,6 @@ int usb_driver_claim_interface(struct usb_driver *driver, struct usb_interface *iface, void *priv) { struct device *dev; - struct usb_device *udev; int retval = 0; if (!iface) @@ -524,8 +523,6 @@ int usb_driver_claim_interface(struct usb_driver *driver, if (!iface->authorized) return -ENODEV; - udev = interface_to_usbdev(iface); - dev->driver = &driver->drvwrap.driver; usb_set_intfdata(iface, priv); iface->needs_binding = 0;