Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp3474681rwb; Fri, 30 Sep 2022 04:15:55 -0700 (PDT) X-Google-Smtp-Source: AMsMyM76KWfCbz8t7iA6WKscDSQzs2y9ZeOV46gfrAH9QCfBWZk/TNl/WGZFu86vIqwhth7ys6mS X-Received: by 2002:a63:135a:0:b0:440:f2af:c4cd with SMTP id 26-20020a63135a000000b00440f2afc4cdmr3254877pgt.393.1664536555036; Fri, 30 Sep 2022 04:15:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664536555; cv=none; d=google.com; s=arc-20160816; b=L79Jivb932mVDSResfODrob6S7nGXfj+q4+9IjrZrPYDrYz0t1Ha+ut/DYgQ3pd6ZJ juGOuvVf/9CeLXDtwJVXUl8y4fq0xE2Yr9lplVJnbuUONw2pRRgX9N0tPMqK412u4sQo boZn3YjssiUQ60FYJBeSe52emy8z5KlAE4502x3em/9klYHZqnGsKV1oPhUd4Vn6XVFk dow6n1I/m7zT5FRYkkQWuQofXiddTHBvD70arLE3LjE5cHIuQeQN4AGIAODpZYX3HBit Jo25IEIo2hTQZat06pIafakEZE9vwB11Nv46i2aCZCUsUP9kkSIWsL9yUJ8ZFH8RI92G 9DNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=nniwNdmExausG/N7NRDEM5gj5MeVLDuPQsFT4K/w1gs=; b=qxD+zPd1avc6R+0r4Qbz+DEGLkQOq981XaWI3rkjxOhtXu1p2zxUqSCtKWIG15Lic6 MW9qY5GKzsEXF1bIzgAWeeRnxOjN0l2PdNQ1701dMQ05FNeSDmZaIJC/gCUCcXF0rHaB 0cAPVRmluhFQB2gTG9h1XUPLFeRjErUCxQnOPswPKPD13G08T+XZqIxpjhc9JBK2wujj Tsf7a9Tsh5RW0fQZrL2mQCu31+ZzFKJwjuYS72ZD0atOhm1kR4HqNywuEvhwnKU3t9MO 2m4fY24SlvbgvM++njLgJcL6slCUYJi+pMI+WyYBGuBBrp53bhtI5fD1nvTV3sgcM56X 4fEA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y13-20020a170902d64d00b001786a4a4c98si2470278plh.371.2022.09.30.04.15.43; Fri, 30 Sep 2022 04:15:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231373AbiI3LDC (ORCPT + 99 others); Fri, 30 Sep 2022 07:03:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34206 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230240AbiI3LCk (ORCPT ); Fri, 30 Sep 2022 07:02:40 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7398965649 for ; Fri, 30 Sep 2022 03:40:16 -0700 (PDT) Received: from dggpemm500022.china.huawei.com (unknown [172.30.72.53]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4Mf67P13xPzWh56; Fri, 30 Sep 2022 18:35:13 +0800 (CST) Received: from dggpemm500013.china.huawei.com (7.185.36.172) by dggpemm500022.china.huawei.com (7.185.36.162) 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 18:39:22 +0800 Received: from ubuntu1804.huawei.com (10.67.175.36) 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 18:39:21 +0800 From: Chen Zhongjin To: , CC: , , Subject: [PATCH -next] orangefs: Remove unused variable 'i' Date: Fri, 30 Sep 2022 18:35:31 +0800 Message-ID: <20220930103531.41726-1-chenzhongjin@huawei.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.67.175.36] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To dggpemm500013.china.huawei.com (7.185.36.172) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Reported by Clang [-Wunused-but-set-variable] 'commit 3e9dfc6e1e8b ("orangefs: move do_readv_writev to direct_IO")' This commit added the variable 'i' in orangefs_direct_IO(). However this 'i' was never used by other code except iterates itself. It seems that it's some undeleted debug code. Remove it for code clean. Signed-off-by: Chen Zhongjin --- fs/orangefs/inode.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/fs/orangefs/inode.c b/fs/orangefs/inode.c index 7a8c0c6e698d..eaa35a966115 100644 --- a/fs/orangefs/inode.c +++ b/fs/orangefs/inode.c @@ -530,7 +530,6 @@ static ssize_t orangefs_direct_IO(struct kiocb *iocb, size_t count = iov_iter_count(iter); ssize_t total_count = 0; ssize_t ret = -EINVAL; - int i = 0; gossip_debug(GOSSIP_FILE_DEBUG, "%s-BEGIN(%pU): count(%d) after estimate_max_iovecs.\n", @@ -556,7 +555,6 @@ static ssize_t orangefs_direct_IO(struct kiocb *iocb, while (iov_iter_count(iter)) { size_t each_count = iov_iter_count(iter); size_t amt_complete; - i++; /* how much to transfer in this loop iteration */ if (each_count > orangefs_bufmap_size_query()) -- 2.17.1