Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp345978pxj; Thu, 27 May 2021 01:19:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy6ilkgyLou1QqR4gW0v0JvV3DSDhslZjkfk9Rk0DWVqHeMZ6Q2jP1fz9yxXb+oBdhtX6eJ X-Received: by 2002:aa7:d30f:: with SMTP id p15mr2806414edq.264.1622103590031; Thu, 27 May 2021 01:19:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622103590; cv=none; d=google.com; s=arc-20160816; b=VwwqWivUmDVUVvOeoTglmAXGHaSgbVlJOUg6MjaHSyMMv5kd49XLy/GBOKcTVjbR/n 0MxWrABXE0Q3EDne8ye94ufzzu5Tt1PwGXJDGC4nD/XD73ytX+JkSQwOYJVnMRoni2hW G68mckr3LTnDUvp74UfLIKGayXsjaDdNR79nujlEXZOkWOgfBZwXY2RhG9AlPTtC27Nh Q7OPFph6DHKPYO3j7KdIDoLJPHYQIE9Ejbelz11flp1mYS5QGbjNkmQmrRm0/IimyWs3 6xT+0rX+GbXxw1VQjk75q8u+/fmX11bjy07N6R0kTGhm5e9RFqt6R5BfMJaMZ5XvAOzz EItA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=7TBp2/0xrJlvWJe3b3c+wB1BNBOS/CZI3rImo3F3Aj0=; b=Yd6yIninL3EQBFvwrg1GH9F3HgmGL62u/W3eivDzfWBvM+4eXR919L9YZKdOfiA1Nn buLCE/X+prJ8fUml8c+YZ3zyNZCOO0SSsBWf0j2NcWZ8fYhxabDA8Moh5I7OY/hWAHgM HNnOXYJM53uOBeOjsLLSEKro4GMCoFcTZ1rT9qMh1Mq3PhHE77rGekR5w6sEajS1txOW dZ1NRB8PhYLJ9TJaojTUIAJ/h4HzRhmqpmfgWKrGkTaJii8wHYfNecL8/+3QGog/kMn9 sT1Ajaem6Y25iDJFBV9ygfDG0JlPH7KidbdjqJSAao8ihKA8EkjztTaFk/lF1yRxcKQK 950A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Q9qUaLd2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hs23si1489016ejc.454.2021.05.27.01.19.26; Thu, 27 May 2021 01:19:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Q9qUaLd2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235207AbhE0IRt (ORCPT + 99 others); Thu, 27 May 2021 04:17:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47410 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235054AbhE0IRp (ORCPT ); Thu, 27 May 2021 04:17:45 -0400 Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F2D27C061760 for ; Thu, 27 May 2021 01:16:12 -0700 (PDT) Received: by mail-wm1-x335.google.com with SMTP id l18-20020a1c79120000b0290181c444b2d0so1942758wme.5 for ; Thu, 27 May 2021 01:16:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=7TBp2/0xrJlvWJe3b3c+wB1BNBOS/CZI3rImo3F3Aj0=; b=Q9qUaLd2SSlIYtGjABhfs97HF8AqYbSKHxHZp1Xj3DdJhIjeIGpUikwihEW2p8fK7v QGiOsukD19AM0ydVonj9tYrFMJujEw5/1C9ybuPCbUE8WS97UbxOy0QSbrKTpswUO2a6 v0X1yKfLXZXY8CS4ZzTS94HtIarVXWspx5SruJTLlgJPsy5GAVGF9SdlRcJW4PVq1iJL kp8nnpsVV3cKyO3g+1fvW+ejjKaRBAUAkfzBomjWiGpqVC8RcMq2aS7K4eb8v2yLjCOD 7o3KDxG2PpPYneiW7uDZR8TpmQ572cdq+OQs0ZVh2S83Jfw9n7bq8y+z9x9T5OmD/XwP ZUOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=7TBp2/0xrJlvWJe3b3c+wB1BNBOS/CZI3rImo3F3Aj0=; b=aylCm4u1BfXaw4SvKvH+mibsvEgXq5LZZqcDLhyAVPcnVplaWia/EjO2HA06Gv+ARz r24w9F1a200Ik4Uv3TAQGNdbiqDwH52heDStQRKjLbUBFY+VkHDAoVc1ZLlEE0GGCXEn XiDPgZOnYD88W9L8DjOdV+MFtq2LBJeBOC2RbLfWmFU2PjQT3ioPG6hkIoQYK/Nj4IXW f+LLX8VZP+8UpGBINGpw/LLTWhbdiysQPJGi+BaUTUsvTrYGKuhlhfRJ3FgQrsfo+rfB wO+gatqzkh9Z0ofmEyc/YItl/d5690EVlXeAjKkO7UUdeIrVu8bhf0Q61AcsTMUis1I3 QYuQ== X-Gm-Message-State: AOAM530lS37jh5JtrJjQlwXyrd33DMxFLyZp9UfoyZaR96TJyu3RFBlu MRp/frFi1A1b1I6dV/8gOH4WUQ== X-Received: by 2002:a7b:c252:: with SMTP id b18mr2234881wmj.32.1622103371490; Thu, 27 May 2021 01:16:11 -0700 (PDT) Received: from dell ([91.110.221.223]) by smtp.gmail.com with ESMTPSA id a11sm2056943wra.96.2021.05.27.01.16.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 May 2021 01:16:10 -0700 (PDT) Date: Thu, 27 May 2021 09:16:09 +0100 From: Lee Jones To: Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, Mathias Nyman , linux-usb@vger.kernel.org Subject: Re: [PATCH 17/24] usb: host: xhci: Remove unused variable 'len' Message-ID: <20210527081609.GF543307@dell> References: <20210526130037.856068-1-lee.jones@linaro.org> <20210526130037.856068-18-lee.jones@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 27 May 2021, Greg Kroah-Hartman wrote: > On Wed, May 26, 2021 at 02:00:30PM +0100, Lee Jones wrote: > > Fixes the following W=1 kernel build warning(s): > > > > drivers/usb/host/xhci.c: In function ‘xhci_unmap_temp_buf’: > > drivers/usb/host/xhci.c:1349:15: warning: variable ‘len’ set but not used [-Wunused-but-set-variable] > > > > Cc: Mathias Nyman > > Cc: Greg Kroah-Hartman > > Cc: linux-usb@vger.kernel.org > > Signed-off-by: Lee Jones > > --- > > 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 27283654ca080..ac2a7d4288883 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); > > Sorry, but no, I keep rejecting this over and over, it needs to handle > the error handling properly and not paper over it like this :( Will fix. > All the bots keep tripping up on it, you are not alone. -- Lee Jones [李琼斯] Senior Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog