From patchwork Mon Oct 10 03:09:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen Zhongjin X-Patchwork-Id: 12995376 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 44678C433F5 for ; Fri, 30 Sep 2022 11:56:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231133AbiI3L4A (ORCPT ); Fri, 30 Sep 2022 07:56:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43964 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230266AbiI3Lz7 (ORCPT ); Fri, 30 Sep 2022 07:55:59 -0400 Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2BF5F125DB7; Fri, 30 Sep 2022 04:55:57 -0700 (PDT) Received: from dggpemm500020.china.huawei.com (unknown [172.30.72.53]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4Mf7sr46RSzHqJq; Fri, 30 Sep 2022 19:53:36 +0800 (CST) Received: from dggpemm500013.china.huawei.com (7.185.36.172) by dggpemm500020.china.huawei.com (7.185.36.49) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Fri, 30 Sep 2022 19:55:55 +0800 Received: from huawei.com (10.67.174.245) by dggpemm500013.china.huawei.com (7.185.36.172) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Fri, 30 Sep 2022 19:55:55 +0800 From: Chen Zhongjin To: , , , CC: , , , , , Subject: [PATCH -next 1/2] net/rds: Remove unused variable 'total_copied' Date: Mon, 10 Oct 2022 11:09:03 +0800 Message-ID: <20221010030904.2883557-2-chenzhongjin@huawei.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20221010030904.2883557-1-chenzhongjin@huawei.com> References: <20221010030904.2883557-1-chenzhongjin@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.67.174.245] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To dggpemm500013.china.huawei.com (7.185.36.172) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org Reported by Clang [-Wunused-but-set-variable] 'commit 0cebaccef3ac ("rds: zerocopy Tx support.")' This commit introduced the variable 'dest_frames'. However this variable is never used by other code except iterates itself, so remove it. Signed-off-by: Chen Zhongjin --- net/rds/message.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/net/rds/message.c b/net/rds/message.c index d74be4e3f3fa..eee2e674d5c0 100644 --- a/net/rds/message.c +++ b/net/rds/message.c @@ -366,7 +366,6 @@ static int rds_message_zcopy_from_user(struct rds_message *rm, struct iov_iter * struct scatterlist *sg; int ret = 0; int length = iov_iter_count(from); - int total_copied = 0; struct rds_msg_zcopy_info *info; rm->m_inc.i_hdr.h_len = cpu_to_be32(iov_iter_count(from)); @@ -404,7 +403,6 @@ static int rds_message_zcopy_from_user(struct rds_message *rm, struct iov_iter * ret = -EFAULT; goto err; } - total_copied += copied; length -= copied; sg_set_page(sg, pages, copied, start); rm->data.op_nents++;