From patchwork Mon Dec 14 11:32:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Zou Wei X-Patchwork-Id: 343805 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E814FC4361B for ; Mon, 14 Dec 2020 11:22:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AFA88229C6 for ; Mon, 14 Dec 2020 11:22:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2407662AbgLNLVz (ORCPT ); Mon, 14 Dec 2020 06:21:55 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:9603 "EHLO szxga05-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730396AbgLNLVk (ORCPT ); Mon, 14 Dec 2020 06:21:40 -0500 Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4Cvf7X2cShzM52m; Mon, 14 Dec 2020 19:20:08 +0800 (CST) Received: from linux-lmwb.huawei.com (10.175.103.112) by DGGEMS403-HUB.china.huawei.com (10.3.19.203) with Microsoft SMTP Server id 14.3.498.0; Mon, 14 Dec 2020 19:20:44 +0800 From: Zou Wei To: , CC: , , Zou Wei Subject: [PATCH -next] usb: xhci: remove unused variable Date: Mon, 14 Dec 2020 19:32:11 +0800 Message-ID: <1607945531-15059-1-git-send-email-zou_wei@huawei.com> X-Mailer: git-send-email 2.6.2 MIME-Version: 1.0 X-Originating-IP: [10.175.103.112] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Fix variable set but not used compilation warnings: drivers/usb/host/xhci.c:1338:15: warning: variable ‘len’ set but not used [-Wunused-but-set-variable] unsigned int len; ^~~ Signed-off-by: Zou Wei --- drivers/usb/host/xhci.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index 91ab81c..24e5a0f 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c @@ -1335,7 +1335,6 @@ static bool xhci_urb_temp_buffer_required(struct usb_hcd *hcd, static void xhci_unmap_temp_buf(struct usb_hcd *hcd, struct urb *urb) { - unsigned int len; unsigned int buf_len; enum dma_data_direction dir; @@ -1351,10 +1350,10 @@ static void xhci_unmap_temp_buf(struct usb_hcd *hcd, struct urb *urb) dir); if (usb_urb_dir_in(urb)) - len = sg_pcopy_from_buffer(urb->sg, urb->num_sgs, - urb->transfer_buffer, - buf_len, - 0); + sg_pcopy_from_buffer(urb->sg, urb->num_sgs, + urb->transfer_buffer, + buf_len, + 0); urb->transfer_flags &= ~URB_DMA_MAP_SINGLE; kfree(urb->transfer_buffer);