Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp4967513pxu; Thu, 10 Dec 2020 09:37:13 -0800 (PST) X-Google-Smtp-Source: ABdhPJwKxgo7YTSD2jDFr8vuBk+TJ92PBhN3TlQPYCBh78KaudaEceTMNLs5M1Kubm84reAZambW X-Received: by 2002:a50:fd88:: with SMTP id o8mr7943329edt.386.1607621833365; Thu, 10 Dec 2020 09:37:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607621833; cv=none; d=google.com; s=arc-20160816; b=lDxpEfZf+ZKPN2u2Rc4zZ5OtmQulG1+ElQ/oZQ5BooJIKnBNCDj8/UOMLv7+rvsfM6 Iafoblcl7Znuo/UlKr4Fe0sHJ69r0eYjceC0I00+/JBiMYD+Mv+QRsfWBpqbBrShvnhX wmKk42S/E69WLCNd238v9JRXumLIXNJsV97mrE+6zOZHRt6kzuuzw6f1a2VuZwd8MN0X 3TtDrVaa2svRAjs2sAOwGpUjCX6eZYhBwu2mAXRssTDaIP/vKizRdMFz3PB7qP0dFpb3 Wp8qg1k7n2IxM7O0mUYlZCaRQDgpCw59di3OlOeog0DKvIrg0Ws4mYYOY984ekxiFmMt DL6w== 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:from:references :cc:to:subject:dkim-signature; bh=tv47+Gn9kE/EuHtBfv1iSClR82qDNTS3+tgrsyQwWZI=; b=ceRQUZq65QRzZJVpESn38P1xjKRsibnjYqi1RUchpKlRV4aq49ieoF2rHCblyhO+6F IuXMTmJ6bB0VMHl73enOA/cRaB57T9TGx6R76tIWHwbRRenyYzpVNLZMt1IPLUI00zNV iQ8tB/XAXoHbJiYTRKrcPS1cR8IqjREyFa3KTDu53GyLTxlJP8myEKwbbD14Z+LZTcx5 hRKD+uvZg3IJqB1BGDIX1YRECOipkqjwhve5GHdKNskNyduJC4s4sHaTlw23nEL6BhF6 +2f7jWcEUYxEXObCVSXAa2qZHAxxaErRYPDg5EVnws1doPSwVRiblt0G0gwTtreU37ol qJYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=qeHHxg2I; 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 p18si3656797eds.125.2020.12.10.09.36.49; Thu, 10 Dec 2020 09:37:13 -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=qeHHxg2I; 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 S2392758AbgLJReU (ORCPT + 99 others); Thu, 10 Dec 2020 12:34:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33010 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2392735AbgLJReO (ORCPT ); Thu, 10 Dec 2020 12:34:14 -0500 Received: from mail-lf1-x142.google.com (mail-lf1-x142.google.com [IPv6:2a00:1450:4864:20::142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9B809C0613D6; Thu, 10 Dec 2020 09:33:33 -0800 (PST) Received: by mail-lf1-x142.google.com with SMTP id y19so9354420lfa.13; Thu, 10 Dec 2020 09:33:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=tv47+Gn9kE/EuHtBfv1iSClR82qDNTS3+tgrsyQwWZI=; b=qeHHxg2I3V3mzqIR8CHFHAnKgte4wW0I/vBa1eU3K/yYv8NzcWkYKZL3QTnyoM785c pvqVLBr4jsdWzAK6vxa1gcnv46LDBbmgbyHE1J8qGuba1otBI84SM50fLdasWbifIN7p zld331qUX+H+7WtvVCPks1j9TH60xfERq1HWBiTgndHWGKtgJrZkMkNHb5Iy7dRUL1o9 nqx068ePhrhfHk1SzkgrHZuWWWSi/lsAqj2k91Y+iShCUDjg0BIl+E94iovRpi5Ili9L K/o6TR4OHdjy46qQGyaCgUEP3rsxCl4foYMvT5g18DGS3f+UbQkQcKlaGW0ydrztB9rz WUpw== 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:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=tv47+Gn9kE/EuHtBfv1iSClR82qDNTS3+tgrsyQwWZI=; b=bTXQ13VEIfZPRcB1Y/BDXWoRXbO6RaHd2BFzePfVkyFrGWVw3zKLnJr2zawUa/xh/6 WK3vTq/Py/iaPf8hqNMTjVdYN7FyHQmnaBdP+UBISB7rUuRet+P8GuPStiCoaVQSE4v1 d1HlpYEi+5nTAjEx5HjKxYx+sZ/uod5sj6FNnadnJWBODZDNkuei/QReuBNt5pX1DG93 rMb4SH2GRBC4JL9tSY0qDwgZFj6FVvLJAb24BT6MZMMqrCwPXYpSnuErA9OaCO424O6B 481kwk3DIJ5YXM/In9k4YbLRjGl1D8KDCdEE85qO9kG3idrp7DhNCiN+j1S7Dg1TogeK zcVA== X-Gm-Message-State: AOAM532Obx/8Qo1/FGklxXOfvOORF+rUNp5XKhQNhzw5WHkmboq1YELi zPUk5A52768uuCXrqYpHK2A= X-Received: by 2002:a19:c5:: with SMTP id 188mr3157333lfa.511.1607621612151; Thu, 10 Dec 2020 09:33:32 -0800 (PST) Received: from [192.168.1.101] ([178.176.78.63]) by smtp.gmail.com with ESMTPSA id z17sm588552lfg.275.2020.12.10.09.33.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 10 Dec 2020 09:33:31 -0800 (PST) Subject: Re: [PATCH v3] usb: musb: remove unused variable 'devctl' To: Greg Kroah-Hartman Cc: min.guo@mediatek.com, Bin Liu , 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 Message-ID: Date: Thu, 10 Dec 2020 20:33:30 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/10/20 6:01 PM, Greg Kroah-Hartman 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... > > What happened to your look? I thought I posted it the same day... Indeed, here it is, archived: https://marc.info/?l=linux-usb&m=160621841910477 > thanks, > > greg k-h MBR, Sergei