From patchwork Wed May 19 12:33:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Leizhen \(ThunderTown\)" X-Patchwork-Id: 442396 Delivered-To: patch@linaro.org Received: by 2002:a02:7a1b:0:0:0:0:0 with SMTP id a27csp1277084jac; Wed, 19 May 2021 05:33:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwnkRM9UgsVtuzG2om2ZQ1d1svNZyB5z94zsdJwbwT4VBWpYRRt4duoNmc6rEmU0AWwmJo6 X-Received: by 2002:a17:907:3e06:: with SMTP id hp6mr12428555ejc.273.1621427598895; Wed, 19 May 2021 05:33:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621427598; cv=none; d=google.com; s=arc-20160816; b=n0n0/0Uzb5hxvDL6PjTgDh2uGVstEOB4kCWHHq8Rj+CwAhqTOYLGopCxFP0U807JG4 E53VeqGNcpXc1Hg0YOesYcaeByn3Or9HZpHPb1xX8dbfFnX3+Ywf/++0ntn/M9GMA43n nPvPkxhOPlj34fsvhs6yatGKMnImX324q4Jz7F0VqYHJL60Ho6sByNQUcPO0j3y9ZEE6 To7NK7IjdAg1iJdkiWa34gd0+eLV1j8gRcOMCH0cGa2fDG0EHDKOgV5sd0sMNdKpXTz9 DI4ZsBwBhGnsmkQxbqsm1VlrPcapi3kAhqgvdFMS2phyRDjFtJPv5z4SBqn9o6W9ZkQS thyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=A4o7CtZMqQTZ9wFGPHzAqyU55imGE/rzDa13dRsyEps=; b=SzzXHidU2p4xYhTIYI8hA5jVtgfZoasgfXrF9pw01i0Fdsdp9dNZO9aiybok3yrjhx 9craBitvfFLlk+CjJYpIKB7OFeK5ImD5FonynqAH8SEeusjE1P5TNNJG0tYuSm9i23Y5 pPzrd3YmyrZEb0DkiyE+s12nxu+Gf1PU7KXHCJtMJtW6JjfQe4/qE9eFCyEal2Va75DV /TVH8y3HKop5Jbl7IG3FOQyakUlmZoWIn74tbO8dqIECtlwWfDmBpzZDX8d5E9A4HH2I qCmKLxNzOh7I4HopCgMr6/PlWNPU0/sZjgtb1J07XuYBsRudmTdd0gUv+BBVew+6Tc8d fihQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-usb-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-usb-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 8si948359ejx.447.2021.05.19.05.33.18; Wed, 19 May 2021 05:33:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-usb-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-usb-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-usb-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239164AbhESMeh (ORCPT + 4 others); Wed, 19 May 2021 08:34:37 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:4751 "EHLO szxga04-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230423AbhESMeh (ORCPT ); Wed, 19 May 2021 08:34:37 -0400 Received: from dggems706-chm.china.huawei.com (unknown [172.30.72.59]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4FlXHs00V0zpfdx; Wed, 19 May 2021 20:29:44 +0800 (CST) Received: from dggpemm500006.china.huawei.com (7.185.36.236) by dggems706-chm.china.huawei.com (10.3.19.183) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Wed, 19 May 2021 20:33:14 +0800 Received: from thunder-town.china.huawei.com (10.174.177.72) by dggpemm500006.china.huawei.com (7.185.36.236) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Wed, 19 May 2021 20:33:14 +0800 From: Zhen Lei To: Mathias Nyman , Greg Kroah-Hartman , linux-usb CC: Zhen Lei Subject: [PATCH 1/1] usb: xhci: remove unused variable 'len' in xhci_unmap_temp_buf() Date: Wed, 19 May 2021 20:33:04 +0800 Message-ID: <20210519123304.7885-1-thunder.leizhen@huawei.com> X-Mailer: git-send-email 2.26.0.windows.1 MIME-Version: 1.0 X-Originating-IP: [10.174.177.72] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To dggpemm500006.china.huawei.com (7.185.36.236) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org GCC reports the following warning with W=1: drivers/usb/host/xhci.c:1349:15: warning: variable 'len' set but not used [-Wunused-but-set-variable] 1349 | unsigned int len; | ^~~ This variable is not used, remove it to fix the warning. Reported-by: Hulk Robot Signed-off-by: Zhen Lei --- drivers/usb/host/xhci.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- 2.25.1 diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index 27283654ca08..a75ed4a00997 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,7 +1361,7 @@ 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, + (void)sg_pcopy_from_buffer(urb->sg, urb->num_sgs, urb->transfer_buffer, buf_len, 0);