From patchwork Mon Dec 13 09:54:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Yang Li X-Patchwork-Id: 12695875 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 691D9C433EF for ; Mon, 13 Dec 2021 10:17:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=BttVYyTWO67kS5tYbibxxa8vmdG1uXA1Vmp2EKD4Ts4=; b=mZ27cHEtBa2GOj xWOyGSJzIjytLtavDw3jQMVoxOpHTTGlS+XsPMx376llhFwk+keX7XzkozN57ciXuMT4V9Ec6nxcd HRcC7wgFSEoWHZoEWDLXY/cSvjicqayB+x7XQVVzypWVzbbNxLOrWKegjyX5Ei0NgCWo+nLfaB5xN VgVDzQ2NDuWzUF5ZGaq5EfoBy8U72Of2ODzpdrDHWBpN1qeAJJPrVLnJrhHMO9D84HCrCNOq7WIds r+8oemXov/wLsz4RLLhoXDOmYV+dlsM402KzR1lxxlb41Dhlu1UDMOuQeqGK13ZfWKMfCgpkXHe4T j0o2lb24XjGIqadtatPQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mwiMZ-008vhg-Sk; Mon, 13 Dec 2021 10:15:20 +0000 Received: from out30-57.freemail.mail.aliyun.com ([115.124.30.57]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mwi2H-008mvA-Ty; Mon, 13 Dec 2021 09:54:23 +0000 X-Alimail-AntiSpam: AC=PASS; BC=-1|-1; BR=01201311R181e4; CH=green; DM=||false|; DS=||; FP=0|-1|-1|-1|0|-1|-1|-1; HT=e01e04357; MF=yang.lee@linux.alibaba.com; NM=1; PH=DS; RN=19; SR=0; TI=SMTPD_---0V-V3Tqn_1639389254; Received: from localhost(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0V-V3Tqn_1639389254) by smtp.aliyun-inc.com(127.0.0.1); Mon, 13 Dec 2021 17:54:15 +0800 From: Yang Li To: nbd@nbd.name Cc: lorenzo.bianconi83@gmail.com, ryder.lee@mediatek.com, shayne.chen@mediatek.com, sean.wang@mediatek.com, kvalo@kernel.org, davem@davemloft.net, kuba@kernel.org, matthias.bgg@gmail.com, nathan@kernel.org, ndesaulniers@google.com, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, Yang Li , Abaci Robot Subject: [PATCH -next] mt76: remove variable set but not used Date: Mon, 13 Dec 2021 17:54:13 +0800 Message-Id: <20211213095413.99456-1-yang.lee@linux.alibaba.com> X-Mailer: git-send-email 2.20.1.7.g153144c MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211213_015422_181378_752924F0 X-CRM114-Status: UNSURE ( 7.77 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The code that uses variable queued has been removed, and "mt76_is_usb(dev) ? q->ndesc - q->queued : q->queued" didn't do anything, so all they should be removed as well. Eliminate the following clang warnings: drivers/net/wireless/mediatek/mt76/debugfs.c:77:9: warning: variable ‘queued’ set but not used. Reported-by: Abaci Robot Fixes: 2d8be76c1674 ("mt76: debugfs: improve queue node readability") Signed-off-by: Yang Li --- drivers/net/wireless/mediatek/mt76/debugfs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/debugfs.c b/drivers/net/wireless/mediatek/mt76/debugfs.c index b8bcf22a07fd..027d9ea17d04 100644 --- a/drivers/net/wireless/mediatek/mt76/debugfs.c +++ b/drivers/net/wireless/mediatek/mt76/debugfs.c @@ -74,13 +74,12 @@ EXPORT_SYMBOL_GPL(mt76_queues_read); static int mt76_rx_queues_read(struct seq_file *s, void *data) { struct mt76_dev *dev = dev_get_drvdata(s->private); - int i, queued; + int i; seq_puts(s, " queue | hw-queued | head | tail |\n"); mt76_for_each_q_rx(dev, i) { struct mt76_queue *q = &dev->q_rx[i]; - queued = mt76_is_usb(dev) ? q->ndesc - q->queued : q->queued; seq_printf(s, " %9d | %9d | %9d | %9d |\n", i, q->queued, q->head, q->tail); }