From patchwork Sat May 15 08:46:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Zhihao Cheng X-Patchwork-Id: 439696 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.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham 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 87E95C433B4 for ; Sat, 15 May 2021 08:41:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5844361401 for ; Sat, 15 May 2021 08:41:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233512AbhEOIm1 (ORCPT ); Sat, 15 May 2021 04:42:27 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:2989 "EHLO szxga06-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232517AbhEOIm1 (ORCPT ); Sat, 15 May 2021 04:42:27 -0400 Received: from DGGEMS409-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga06-in.huawei.com (SkyGuard) with ESMTP id 4FhzMQ2trSzklvg; Sat, 15 May 2021 16:38:58 +0800 (CST) Received: from huawei.com (10.175.127.227) by DGGEMS409-HUB.china.huawei.com (10.3.19.209) with Microsoft SMTP Server id 14.3.498.0; Sat, 15 May 2021 16:41:01 +0800 From: Zhihao Cheng To: , CC: , , , , Subject: [PATCH] usb: xhci: Remove useless variable Date: Sat, 15 May 2021 16:46:47 +0800 Message-ID: <20210515084647.179580-1-chengzhihao1@huawei.com> X-Mailer: git-send-email 2.25.4 MIME-Version: 1.0 X-Originating-IP: [10.175.127.227] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Fix the following gcc warning: drivers/usb/host/xhci.c:1349:15: warning: variable ‘len’ set but not used [-Wunused-but-set-variable ] Reported-by: Hulk Robot Signed-off-by: Zhihao Cheng --- 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 ca9385d22f68..b38a14ef2e15 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c @@ -1346,7 +1346,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; @@ -1362,10 +1361,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);