Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp2870285ybt; Fri, 3 Jul 2020 23:08:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwdK6WSAqwdTi8kHyTBkbfMe5ot7kxlUKaFOqRIZEP2F79676/Q5KruTj8uM8srlz+V1GkK X-Received: by 2002:a50:aca6:: with SMTP id x35mr42760029edc.328.1593842909095; Fri, 03 Jul 2020 23:08:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593842909; cv=none; d=google.com; s=arc-20160816; b=mxvyj+leWY5TQ1TuBQLzs1KhjTVePlks1dMKpzVxw8/DCLvsSs07jXvlJtVIy93OQg fqXqhQKdJYIkz2cr3yzcdGVkkMnJ3Z1ZAlFm24CsOjSUEad5adlFWH9pOjyTbzJ4cKoQ nL6Y0SRgZk5J8aCv16hpspeNtxke3dK6YnS+VdxEIYP/v+9Dy6YIQZCDFMiTLrVavxbI tgmJzT5QNj+agxh37fsvqwXpLerD7fp1ACpKbYFKDTJx4OHdGLx9dBUlPL9Q+yiPQcec 84kQ++OYJAtkLNTmksnZ1VlhdzREynxVR5G9Qf9Ti/RXICdiaoNARuERjy3ccMXFCOPb qwug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=vRVuzVQc1/iwDiZGGPMdKdKw3G4XY0OYH1BY4nV6X7E=; b=KprJ7vM/LdPqfbRX6P8D8cft5xWH6OnxP/xl13dcmMT9G639m9Y8dOdnFFyKIYhBA9 y8nYHt7YeUQ1ZMWdoheyE4FaaSN0Cvsx4skz9kc251Nje6A3X82rmMNA+bYEVFbbz78d I9LPcRbjWbRIuHue7UFpeHH+3BVwHhQAUO8eVbFhFu2/agTeSoIFuirSU3FnsL5m9C2w MMdfsbd49DlgFchaTVOuvWuFv/ZTBVGRDQ5y1CSRtkBN4S6S5Sq1lX3kJM0Uh4GXhpB9 kAfPA0iNVFOI0twEg9QBf3smODIzkpb8j/33KDT+PloGh640SvVcaJU7INedZ1y9ZgsJ a7cA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=iItwMtHd; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id by17si8987653edb.369.2020.07.03.23.08.06; Fri, 03 Jul 2020 23:08:29 -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=@kernel.org header.s=default header.b=iItwMtHd; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727061AbgGDGEv (ORCPT + 99 others); Sat, 4 Jul 2020 02:04:51 -0400 Received: from mail.kernel.org ([198.145.29.99]:54594 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725822AbgGDGEu (ORCPT ); Sat, 4 Jul 2020 02:04:50 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B1DCC207D4; Sat, 4 Jul 2020 06:04:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1593842690; bh=/8vSxFn9V0oswGlBEN5dRRU1JZ7ExkRloN1fTwm5oNE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=iItwMtHdFCkvptr3+wC5oBSGGXbOgDNx2gPwmgsCTOB9hZaNp9x1NukOjke8PsoZm LU6UKJAFh7leBTlINaLmf8/tik/QF8IhaHYbr1woCmpOwenN8aJ6AMdSu0uNm3QREh su1Am+O/L4hv41K8lDOtafcHW541qbu7l2T4hx4A= Date: Sat, 4 Jul 2020 08:04:46 +0200 From: Greg KH To: Lee Jones Cc: Minas Harutyunyan , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , "linux-usb@vger.kernel.org" , Ben Dooks Subject: Re: [PATCH 11/30] usb: dwc2: gadget: Avoid pointless read of EP control register Message-ID: <20200704060446.GA20254@kroah.com> References: <20200702144625.2533530-1-lee.jones@linaro.org> <20200702144625.2533530-12-lee.jones@linaro.org> <20200703072926.GA2322133@kroah.com> <20200703171626.GC2743379@dell> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200703171626.GC2743379@dell> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 03, 2020 at 06:16:26PM +0100, Lee Jones wrote: > On Fri, 03 Jul 2020, Minas Harutyunyan wrote: > > > Hi, > > > > On 7/3/2020 11:29 AM, Greg KH wrote: > > > On Thu, Jul 02, 2020 at 03:46:06PM +0100, Lee Jones wrote: > > >> Commit ec1f9d9f01384 ("usb: dwc2: gadget: parity fix in isochronous mode") moved > > >> these checks to dwc2_hsotg_change_ep_iso_parity() back in 2015. The assigned > > >> value hasn't been read back since. Let's remove the unnecessary H/W read. > > >> > > >> Fixes the following W=1 warning: > > >> > > >> drivers/usb/dwc2/gadget.c: In function ‘dwc2_hsotg_epint’: > > >> drivers/usb/dwc2/gadget.c:2981:6: warning: variable ‘ctrl’ set but not used [-Wunused-but-set-variable] > > >> 2981 | u32 ctrl; > > >> | ^~~~ > > >> > > >> Cc: Minas Harutyunyan > > >> Cc: Ben Dooks > > >> Signed-off-by: Lee Jones > > >> --- > > >> drivers/usb/dwc2/gadget.c | 2 -- > > >> 1 file changed, 2 deletions(-) > > >> > > >> diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c > > >> index 116e6175c7a48..fa07e3fcb8841 100644 > > >> --- a/drivers/usb/dwc2/gadget.c > > >> +++ b/drivers/usb/dwc2/gadget.c > > >> @@ -2975,10 +2975,8 @@ static void dwc2_hsotg_epint(struct dwc2_hsotg *hsotg, unsigned int idx, > > >> u32 epctl_reg = dir_in ? DIEPCTL(idx) : DOEPCTL(idx); > > >> u32 epsiz_reg = dir_in ? DIEPTSIZ(idx) : DOEPTSIZ(idx); > > >> u32 ints; > > >> - u32 ctrl; > > >> > > >> ints = dwc2_gadget_read_ep_interrupts(hsotg, idx, dir_in); > > >> - ctrl = dwc2_readl(hsotg, epctl_reg); > > > > > > As you know, lots of hardware requires reads to happen to do things, so > > > are you sure it is safe to remove this read call? > > > > > > > Greg, yes, it's Ok to remove this unnecessary read which remained from > > previous implementations. > > > > Lee, please add "Fixes:" tag and resubmit v2. > > Is this suitable for Stable Greg? Does it fix something that people have ever noticed or care about? Given the age of the bug, I doubt it :) thanks, greg k-h