From patchwork Fri Sep 18 07:18:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Zheng Yongjun X-Patchwork-Id: 258509 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=-12.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham 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 2FF17C43464 for ; Fri, 18 Sep 2020 07:18:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F1ADA21734 for ; Fri, 18 Sep 2020 07:17:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726430AbgIRHR7 (ORCPT ); Fri, 18 Sep 2020 03:17:59 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:13290 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726159AbgIRHR7 (ORCPT ); Fri, 18 Sep 2020 03:17:59 -0400 Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 02832A29E2733212CEEA; Fri, 18 Sep 2020 15:17:57 +0800 (CST) Received: from ubuntu.network (10.175.138.68) by DGGEMS406-HUB.china.huawei.com (10.3.19.206) with Microsoft SMTP Server id 14.3.487.0; Fri, 18 Sep 2020 15:17:50 +0800 From: Zheng Yongjun To: , , , , , CC: Zheng Yongjun Subject: [PATCH -next] rapidio: Remove set but not used variable 'rc' Date: Fri, 18 Sep 2020 15:18:44 +0800 Message-ID: <20200918071844.19772-1-zhengyongjun3@huawei.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-Originating-IP: [10.175.138.68] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Fixes gcc '-Wunused-but-set-variable' warning: drivers/rapidio/rio_cm.c: In function rio_txcq_handler: drivers/rapidio/rio_cm.c:673:7: warning: variable ‘rc’ set but not used [-Wunused-but-set-variable] rc is never used, so remove it. Signed-off-by: Zheng Yongjun --- drivers/rapidio/rio_cm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/rapidio/rio_cm.c b/drivers/rapidio/rio_cm.c index 50ec53d67a4c..545693bd86a3 100644 --- a/drivers/rapidio/rio_cm.c +++ b/drivers/rapidio/rio_cm.c @@ -670,12 +670,11 @@ static void rio_txcq_handler(struct cm_dev *cm, int slot) */ if (!list_empty(&cm->tx_reqs) && (cm->tx_cnt < RIOCM_TX_RING_SIZE)) { struct tx_req *req, *_req; - int rc; list_for_each_entry_safe(req, _req, &cm->tx_reqs, node) { list_del(&req->node); cm->tx_buf[cm->tx_slot] = req->buffer; - rc = rio_add_outb_message(cm->mport, req->rdev, cmbox, + rio_add_outb_message(cm->mport, req->rdev, cmbox, req->buffer, req->len); kfree(req->buffer); kfree(req);