From nobody Sun Feb 8 07:14:34 2026 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4C7ECC001B0 for ; Wed, 26 Jul 2023 10:18:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233326AbjGZKSA (ORCPT ); Wed, 26 Jul 2023 06:18:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49950 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232199AbjGZKRw (ORCPT ); Wed, 26 Jul 2023 06:17:52 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A211B1995 for ; Wed, 26 Jul 2023 03:17:50 -0700 (PDT) Received: from dggpeml500025.china.huawei.com (unknown [172.30.72.53]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4R9qWZ3vrzztRXp; Wed, 26 Jul 2023 18:14:34 +0800 (CST) Received: from ubuntu1804.huawei.com (10.67.174.202) by dggpeml500025.china.huawei.com (7.185.36.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Wed, 26 Jul 2023 18:17:48 +0800 From: Zhu Wang To: , , , CC: Subject: [PATCH -next] rapidio: fix -Wunused-const-variable= warning Date: Wed, 26 Jul 2023 18:17:14 +0800 Message-ID: <20230726101714.169784-1-wangzhu9@huawei.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.67.174.202] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To dggpeml500025.china.huawei.com (7.185.36.35) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When building with W=3D1, the following warning occurs. drivers/rapidio/rio_cm.c: In function =E2=80=98rio_txcq_handler=E2=80=99: drivers/rapidio/rio_cm.c:673:7: warning: variable =E2=80=98rc=E2=80=99 set = but not used [-Wunused-but-set-variable] int rc; Since the variable "rc" is not used in function 'rio_txcq_handler', so we removed it to remove the warning. Fixes: b6e8d4aa1110 ("rapidio: add RapidIO channelized messaging driver") Signed-off-by: Zhu Wang --- drivers/rapidio/rio_cm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/rapidio/rio_cm.c b/drivers/rapidio/rio_cm.c index 49f8d111e546..652e30c03a00 100644 --- a/drivers/rapidio/rio_cm.c +++ b/drivers/rapidio/rio_cm.c @@ -670,13 +670,12 @@ static void rio_txcq_handler(struct cm_dev *cm, int s= lot) */ if (!list_empty(&cm->tx_reqs) && (cm->tx_cnt < RIOCM_TX_RING_SIZE)) { struct tx_req *req, *_req; - int rc; =20 list_for_each_entry_safe(req, _req, &cm->tx_reqs, node) { list_del(&req->node); cm->tx_buf[cm->tx_slot] =3D req->buffer; - rc =3D rio_add_outb_message(cm->mport, req->rdev, cmbox, - req->buffer, req->len); + rio_add_outb_message(cm->mport, req->rdev, cmbox, + req->buffer, req->len); kfree(req->buffer); kfree(req); =20 --=20 2.17.1