Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1490766pxu; Tue, 24 Nov 2020 01:19:56 -0800 (PST) X-Google-Smtp-Source: ABdhPJxvOwMtyc5yhiZ5+pHyP9sBFiwPazWf0QP4JNjr1AqLJnqzqEH1OqcRcyFxxzJWhfsvT24D X-Received: by 2002:a17:907:411b:: with SMTP id nw19mr3208862ejb.150.1606209595765; Tue, 24 Nov 2020 01:19:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606209595; cv=none; d=google.com; s=arc-20160816; b=W4MjP8Hw4O+HYo6J3plinkDnFUGvDd0Qfq0nqPMAnnlzBQ1IPjq5g3EQp98ewBHBK5 yE2UVq4SP57kgEpYpEyBOd3tiQWkPjs3GhcdFePhGzQTc5s6f+R05ekVNk7Ykna62I66 804kpwAIGHzkBisujL0RqrO2sCWsJxzAbJDTRcAtTgfXoKfeO3QrZciEk0XfMyYbbVSp zb7dDOw7KfzqosaYgNTxn3Tkm2l1kcLC6ym7abSa5+Wm402cRsr2T4nqlnttMOmeAiVd mfNSmsHqJ3zrT4SOi3sL7IqAdlxkWiXk/nPV88GZz7Ghd+zrl88pdE4Ya9NH4HI7Ki3j 6e+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:organization :from:references:cc:to:subject:dkim-signature; bh=fIukb1V/mzn93MU1dQnXMsPLeNbtxaANkhBLdUp3br0=; b=r/5mQf3saCUGiqekZZx4ZnmAraiE5OGdJMw2swN4FN9jFMVI7wZZ41y+RFvBWC6eXK KbTb/dwGhxI30CZwqC/59roxA62oja6UeRJQZUYmMakRfpXaY/QZNrs6wIGqUGwmy69R ImGLWv3U+68IcakEgjP7FBBgpihqvmYD2Sm4M6wvIP1Qsgse4M+J9UFSWM6WUMOI4aJ9 vkutHeXckPW8Pw3hApDj5xzTs8uolb79noBWuP7YN/devwsHIGPHIMH1pvrD22s6kKDo c79eQ1TjPs5kx4FhYt56ix5SIxNcTfhAkypN6ey6jvf+QzJiz4rSAkxNSDunnbj3Yt47 rQcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Cs3k1SZ7; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dn24si8147122edb.11.2020.11.24.01.19.32; Tue, 24 Nov 2020 01:19:55 -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=@gmail.com header.s=20161025 header.b=Cs3k1SZ7; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729872AbgKXJNw (ORCPT + 99 others); Tue, 24 Nov 2020 04:13:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50416 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727477AbgKXJNw (ORCPT ); Tue, 24 Nov 2020 04:13:52 -0500 Received: from mail-lf1-x143.google.com (mail-lf1-x143.google.com [IPv6:2a00:1450:4864:20::143]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CCDA4C0613D6; Tue, 24 Nov 2020 01:13:51 -0800 (PST) Received: by mail-lf1-x143.google.com with SMTP id s30so27866481lfc.4; Tue, 24 Nov 2020 01:13:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:organization:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=fIukb1V/mzn93MU1dQnXMsPLeNbtxaANkhBLdUp3br0=; b=Cs3k1SZ7ifHsNVz0CZW36NkPQFd0rGwgER9f8cZGQQko1ikOKhr4QWnWr7eWc7Yzfc MDtohI4WKe5AtxCJOwRVbfnbEqWzt6iwZKRcsWl6Zntdve4L6np4Ltdc8UA1Ybq4Vx+f jkTbfww4FtxD1tOa71zcmihcXFm1DoAyCkty0gzyYBGMpTbPJHxtlmGYgnyZCvOg7WwG /OEiGh7E4T52ddQQ33opkEjHCbtbasseciyiYlm9rrkUzHsQog+59kJpgL/e/JVl9bZ2 Q9bgzkKdhB0y23+hR20ySeSipeqIN5ffi6/V9lvozoC6G/epREtERZS8gD3NrAhsfq5E gy1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:organization :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=fIukb1V/mzn93MU1dQnXMsPLeNbtxaANkhBLdUp3br0=; b=A5/2/CYeKhVCmukyL2KJH50MYdLk5UbvMDpN2DmjzCk5PLTJyn62IsgKEZJUo3lKI6 ISvRvUu3c/Gpdbl8rq1eS61nhVRZO3H5xkSzlMS/WSY3KTz1K/sPSH5M9CkTmYKxT08v mcsaKHsFqk/0kgnJa7VnjcuriYyw44apCBFza+2Hes4QUC/Q6SJ3J5gXmYmvIIaA+C3z 08IA9giUMgGwD4R7Rj1mNdApyEO0FltV/T+kQfXBSVjRrCCOifbBf4VVHsjcnFjDk02y O7OTdXQTpwo05rfT7Fw8i9GvF7ga3y309dSNChVpcwIMoES1v2E6bY4SZ5lvMHAmDPmX rbtQ== X-Gm-Message-State: AOAM533gNbsz9I4NHmbIdHlaTF2pf7OtSxUAe8Dj5/81JozTgv/x5lPt zyIovb/uWYQvBQDlqqEpWTs= X-Received: by 2002:a19:7b06:: with SMTP id w6mr1484289lfc.260.1606209230293; Tue, 24 Nov 2020 01:13:50 -0800 (PST) Received: from ?IPv6:2a00:1fa0:42b3:ccad:a982:d97f:90ed:ada1? ([2a00:1fa0:42b3:ccad:a982:d97f:90ed:ada1]) by smtp.gmail.com with ESMTPSA id 6sm253081ljr.127.2020.11.24.01.13.49 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 24 Nov 2020 01:13:49 -0800 (PST) Subject: Re: [PATCH v3] usb: musb: remove unused variable 'devctl' To: min.guo@mediatek.com, Bin Liu Cc: Greg Kroah-Hartman , Alan Stern , 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 References: <20201124084955.30270-1-min.guo@mediatek.com> From: Sergei Shtylyov Organization: Brain-dead Software Message-ID: Date: Tue, 24 Nov 2020 12:13:42 +0300 User-Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 MIME-Version: 1.0 In-Reply-To: <20201124084955.30270-1-min.guo@mediatek.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello! On 24.11.2020 11:49, 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 > --- > changes in v3 > suggested by Greg Kroah-Hartman: > Add a comment. > > changes in v2 > suggested by Alan Stern: > Add void before musb_read to indicate that the register MUSB_DEVCTL > was intended to be read and discarded. > --- > drivers/usb/musb/musbhsdma.c | 8 +++++--- > 1 file changed, 5 insertions(+), 3 deletions(-) > > diff --git a/drivers/usb/musb/musbhsdma.c b/drivers/usb/musb/musbhsdma.c > index 0aacfc8be5a1..2a345b4ad015 100644 > --- a/drivers/usb/musb/musbhsdma.c > +++ b/drivers/usb/musb/musbhsdma.c [...] > @@ -336,7 +334,11 @@ irqreturn_t dma_controller_irq(int irq, void *private_data) > < musb_channel->len) ? > "=> reconfig 0" : "=> complete"); > > - devctl = musb_readb(mbase, MUSB_DEVCTL); > + /* > + * Some hardware may need to read the > + * MUSB_DEVCTL register once to take effect. > + */ > + (void)musb_readb(mbase, MUSB_DEVCTL); Hm, forcibly reading DevCtl in the DMA driver... sounds quite nonsensically. Lemme take a look... [...] MBR, Sergei