From: Colin Ian King Date: Wed, 10 Apr 2024 16:22:21 +0000 (+0100) Subject: fs/direct-io: remove redundant assignment to variable retval X-Git-Tag: v6.10-rc1~224^2~16 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fd0a133ef6edb8e49e74af505b38c93af4ba0b1e;p=thirdparty%2Fkernel%2Flinux.git fs/direct-io: remove redundant assignment to variable retval The variable retval is being assigned a value that is not being read, it is being re-assigned later on in the function. The assignment is redundant and can be removed. Cleans up clang scan build warning: fs/direct-io.c:1220:2: warning: Value stored to 'retval' is never read [deadcode.DeadStores] Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20240410162221.292485-1-colin.i.king@gmail.com Reviewed-by: Jan Kara Signed-off-by: Christian Brauner --- diff --git a/fs/direct-io.c b/fs/direct-io.c index 62c97ff9e852a..b0aafe640fa42 100644 --- a/fs/direct-io.c +++ b/fs/direct-io.c @@ -1217,7 +1217,6 @@ ssize_t __blockdev_direct_IO(struct kiocb *iocb, struct inode *inode, */ inode_dio_begin(inode); - retval = 0; sdio.blkbits = blkbits; sdio.blkfactor = i_blkbits - blkbits; sdio.block_in_file = offset >> blkbits;