[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20220930103531.41726-1-chenzhongjin@huawei.com>
Date: Fri, 30 Sep 2022 18:35:31 +0800
From: Chen Zhongjin <chenzhongjin@...wei.com>
To: <linux-kernel@...r.kernel.org>, <devel@...ts.orangefs.org>
CC: <hubcap@...ibond.com>, <martin@...ibond.com>,
<chenzhongjin@...wei.com>
Subject: [PATCH -next] orangefs: Remove unused variable 'i'
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 <chenzhongjin@...wei.com>
---
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
Powered by blists - more mailing lists