Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp257134pxb; Wed, 18 Nov 2020 03:52:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJyMG7x+3dSR5TCsCat71mR/rgQjjH9NtHmb+CZlSUm/NSq7/YzeulS7sLzIRzOYQqfOqDa4 X-Received: by 2002:a17:906:4753:: with SMTP id j19mr22110692ejs.65.1605700341156; Wed, 18 Nov 2020 03:52:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605700341; cv=none; d=google.com; s=arc-20160816; b=Qbys8/MtYTYiOxtl6vC2YYCWgoynVk1rIpSNf0OceKuvX40+uzkVBcMHQVbTbULOr2 gyUPOu7G+ujat1TfgB6/PzhJ/MRAGROGkOOMeAm5H3ikjrO7SDB3a7RnMNryPrxdrmT+ 9tV7Ed85TwGf8w4WtSXLaHUB838ux5xwsmLMtwrUpguyNa9WDCorqduiRahDRR/60lKV dnUFCFZmW5E95M3NTaQ8sLCiwAUealVUynOE3Tl1zGexI4EaGEeQBI3w1Ss4WU9d94c1 F7KdykK5XGNb8krTXdrkXJxuSS4QaeeUmmlecVud7t30CZGVCgjQYGjopqWIiRIB8kzN 88eQ== 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-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=IEvEuV0w7EoAupuLDm3LWi6sq7gIDWyaRqw7V9Swe8Q=; b=gjp1gjYiGcMwIKqL8x/68nslxKBIogRwgP/pD9GV3NvHG/iI0Cl1vLDOD6zsoqQTKH MhOLYOzBNHBsSsTHBFAzHSUFnx3rh6ZMqUCx/hrJPb//56LwutCNhVDNHjse1xgBspJC 6AjRalbNd2d91KvQ5dAUe/yFOPKLBEzaoWxp3TYFSMWjHS0iZUfxF2iB0OUUOpEeKvB1 re8zcC2SUxvql79oyK15FgKE55r3ihaAYWsOGA9rd+veSVh+JB6Rx2MTOQ8NXisZJz6F LSUxdMcw7d6wuKJjHDlJewBvop/6Q8OcBLE98mvvy33aW7GjgpzypwbFXvIcS68PC4GV lyyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=qlNSUV1G; 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 g10si20079100edv.116.2020.11.18.03.51.58; Wed, 18 Nov 2020 03:52:21 -0800 (PST) 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=qlNSUV1G; 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 S1726731AbgKRLsJ (ORCPT + 99 others); Wed, 18 Nov 2020 06:48:09 -0500 Received: from mail.kernel.org ([198.145.29.99]:37884 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725446AbgKRLsI (ORCPT ); Wed, 18 Nov 2020 06:48:08 -0500 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (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 93132207D3; Wed, 18 Nov 2020 11:48:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1605700088; bh=AVFwWiK5o8kOcZQ0tm/tH6XBw33UzNsFN4Icb/uq+iI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=qlNSUV1GI7YrFNh8EvH0WS+CG5srE8T79RrRbC336+2OtWUtbUGFSomChewe3OABA JXfk/TM2l/aJ+E5UmxOH0hRfQ1k54IpLKgXQAkGRypJPP3A8+155BeFrfFfvNiD3wW vkdKWSYavRv5/EkvJW7QobaE1ZMukQhE1ti6iAj0= Date: Wed, 18 Nov 2020 12:48:54 +0100 From: Greg Kroah-Hartman To: min.guo@mediatek.com Cc: Bin Liu , Matthias Brugger , chunfeng.yun@mediatek.com, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: Re: [PATCH] usb: musb: remove unused variable 'devctl' Message-ID: References: <20201117082125.7619-1-min.guo@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201117082125.7619-1-min.guo@mediatek.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 17, 2020 at 04:21:25PM +0800, min.guo@mediatek.com wrote: > From: Min Guo > > Remove unused 'devctl' variable to fix compile warnings: > > drivers/usb/musb/musbhsdma.c: In function 'dma_controller_irq': > drivers/usb/musb/musbhsdma.c:324:8: warning: variable 'devctl' set > but not used [-Wunused-but-set-variable] > > Signed-off-by: Min Guo > --- > drivers/usb/musb/musbhsdma.c | 4 ---- > 1 file changed, 4 deletions(-) > > diff --git a/drivers/usb/musb/musbhsdma.c b/drivers/usb/musb/musbhsdma.c > index 0aacfc8be5a1..7acd1635850d 100644 > --- a/drivers/usb/musb/musbhsdma.c > +++ b/drivers/usb/musb/musbhsdma.c > @@ -321,8 +321,6 @@ irqreturn_t dma_controller_irq(int irq, void *private_data) > musb_channel->channel.status = > MUSB_DMA_STATUS_BUS_ABORT; > } else { > - u8 devctl; > - > addr = musb_read_hsdma_addr(mbase, > bchannel); > channel->actual_len = addr > @@ -336,8 +334,6 @@ irqreturn_t dma_controller_irq(int irq, void *private_data) > < musb_channel->len) ? > "=> reconfig 0" : "=> complete"); > > - devctl = musb_readb(mbase, MUSB_DEVCTL); Are you sure that the hardware does not require this read to complete the command? Lots of hardware is that way, so be very careful about this. Did you test it? thanks, greg k-h