[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1619346807-47104-1-git-send-email-jiapeng.chong@linux.alibaba.com>
Date: Sun, 25 Apr 2021 18:33:27 +0800
From: Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>
To: viro@...iv.linux.org.uk
Cc: linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>
Subject: [PATCH] fs: direct-io: Remove redundant assignment to retval
Variable retval is set to zero but this value is never read as it is
overwritten with a new value later on, hence it is a redundant
assignment and can be removed.
Cleans up the following clang-analyzer warning:
fs/direct-io.c:1245:2: warning: Value stored to 'retval' is never read
[clang-analyzer-deadcode.DeadStores].
Reported-by: Abaci Robot <abaci@...ux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>
---
fs/direct-io.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/fs/direct-io.c b/fs/direct-io.c
index b2e86e7..b348264 100644
--- a/fs/direct-io.c
+++ b/fs/direct-io.c
@@ -1242,7 +1242,6 @@ static inline int drop_refcount(struct dio *dio)
*/
inode_dio_begin(inode);
- retval = 0;
sdio.blkbits = blkbits;
sdio.blkfactor = i_blkbits - blkbits;
sdio.block_in_file = offset >> blkbits;
--
1.8.3.1
Powered by blists - more mailing lists