From patchwork Tue Nov 24 06:36:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Min Guo X-Patchwork-Id: 331855 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, UNPARSEABLE_RELAY, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E84F4C2D0E4 for ; Tue, 24 Nov 2020 06:36:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9D0B9206FA for ; Tue, 24 Nov 2020 06:36:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728688AbgKXGgZ (ORCPT ); Tue, 24 Nov 2020 01:36:25 -0500 Received: from Mailgw01.mediatek.com ([1.203.163.78]:22522 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726799AbgKXGgZ (ORCPT ); Tue, 24 Nov 2020 01:36:25 -0500 X-UUID: fd51c29a51454c159d4527627ba8908e-20201124 X-UUID: fd51c29a51454c159d4527627ba8908e-20201124 Received: from mtkcas34.mediatek.inc [(172.27.4.253)] by mailgw01.mediatek.com (envelope-from ) (mailgw01.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 836556056; Tue, 24 Nov 2020 14:36:18 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by MTKMBS31N1.mediatek.inc (172.27.4.69) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 24 Nov 2020 14:36:16 +0800 Received: from localhost.localdomain (10.17.3.153) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Tue, 24 Nov 2020 14:36:16 +0800 From: To: Bin Liu CC: Greg Kroah-Hartman , Alan Stern , Matthias Brugger , , , , , , Min Guo Subject: [PATCH v2] usb: musb: remove unused variable 'devctl' Date: Tue, 24 Nov 2020 14:36:13 +0800 Message-ID: <20201124063613.28796-1-min.guo@mediatek.com> X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 X-TM-SNTS-SMTP: A0F036620D6F33AE240B439D83807945270E56099E0A8C59D8D388BF22A197642000:8 X-MTK: N Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org 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 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 | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/usb/musb/musbhsdma.c b/drivers/usb/musb/musbhsdma.c index 0aacfc8be5a1..f59a009c533e 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,7 +334,7 @@ irqreturn_t dma_controller_irq(int irq, void *private_data) < musb_channel->len) ? "=> reconfig 0" : "=> complete"); - devctl = musb_readb(mbase, MUSB_DEVCTL); + (void)musb_readb(mbase, MUSB_DEVCTL); channel->status = MUSB_DMA_STATUS_FREE;