Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp606218pxj; Thu, 27 May 2021 07:41:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyiqHR903v+d3vEN3bDiv9kXP9ABowCkBx+H63RUs1bP4lv+497VL6cjHDgIbL1kqOg9TsF X-Received: by 2002:a92:d60e:: with SMTP id w14mr3187180ilm.0.1622126460478; Thu, 27 May 2021 07:41:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622126460; cv=none; d=google.com; s=arc-20160816; b=JkLZDyElJ1s54ZVHhcVNU2CSJ6+jkUiQ7z8a9P8Kx7IedJL/zxHmHpHjZVtjI21QHU /bn08qXhYD+y+uWrWi3jvcimuWgDK1uqdnKqZyLDRdiV/8PFvcpwYFSvzbEm/LyA0qaE omOwMb02HwwWjh6vt7W8e78ckNKOOH8GgyeedYqm6MuRVIJNUFhDNDqe4zZpvmQ1v62X CDVj9gUgscFISTbX/0y8bWOgty8Sp9MO3Qinm2xWgRzCsHTeMjSREFjKY9kOtChCD85F AbtoEfzBqrUs696yg9kHqHDlzJzqEzJL2x38tZzJUML+Co6gsvpP/fwZegk0Oio9jsMd 3wvg== 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=PvUyMUszYgJudernlRtmo1GRIjrCTCgeBREByTnV2q4=; b=e8FJae0yzfeXQxcFaIERIO37TMV44nyNAYT/Fhgbpgz5ek1YddDbCAmjuhuuNRsnGM 7sKtvTv0wblmVVqV9AE+txnvfSOj47vKoM2GYWEC1gOYYDHzL1vFKMzEOh9SqPUfJYvi X3ukIobNK0XH0xhYc9ZVneqAfprcmg7CfbzOsDso5WQc35sYVAqVC/HLoRj2q8Iu0muc cciMp97JVDP1YlOee1bOeIWlwiOVKEy5IVe0Psm//eRTXvRAmjAkHm+w3+dC5CWgroKB nScjjG2RPa5PCNQVAAJa9tmwB8RM0sPXpnIBKV0sn9Ic84bRSNpOne4qfaJGJDIfBKH1 +vmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=wiZWZrPJ; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t5si2295185iom.76.2021.05.27.07.40.46; Thu, 27 May 2021 07:41:00 -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=@linuxfoundation.org header.s=korg header.b=wiZWZrPJ; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234450AbhE0H2d (ORCPT + 99 others); Thu, 27 May 2021 03:28:33 -0400 Received: from mail.kernel.org ([198.145.29.99]:38106 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229753AbhE0H2d (ORCPT ); Thu, 27 May 2021 03:28:33 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 7982F6054E; Thu, 27 May 2021 07:26:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1622100419; bh=heiu7CttlGAn3jsUC6x/m1TVLzaTKArTVR1Pqh113kY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=wiZWZrPJXQOb5ONPuJmI5MRbHf12MwJPzNG7VeI5KobDtJIvr5we87fhe2TAPSlj1 4TZPiUY8kiuE1lhB1xx/JpNkynqlosr6KLFZe5u+lrfpbXbyJ8oH087F4ICkLQXU1Q +OSeH3LuLnBADAavvP6emEKEbKjlmhxW4D6ePqcg= Date: Thu, 27 May 2021 09:26:51 +0200 From: Greg Kroah-Hartman To: Lee Jones 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: 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: <20210526130037.856068-18-lee.jones@linaro.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 :( All the bots keep tripping up on it, you are not alone. thanks, greg k-h