[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240410174503.wycdhqsglx4pms4q@quack3>
Date: Wed, 10 Apr 2024 19:45:03 +0200
From: Jan Kara <jack@...e.cz>
To: Colin Ian King <colin.i.king@...il.com>
Cc: Alexander Viro <viro@...iv.linux.org.uk>,
Christian Brauner <brauner@...nel.org>, Jan Kara <jack@...e.cz>,
linux-fsdevel@...r.kernel.org, kernel-janitors@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH][next] fs/direct-io: remove redundant assignment to
variable retval
On Wed 10-04-24 17:22:21, Colin Ian King wrote:
> 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 <colin.i.king@...il.com>
Indeed it's assigned a few lines below. Feel free to add:
Reviewed-by: Jan Kara <jack@...e.cz>
Honza
> ---
> fs/direct-io.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/fs/direct-io.c b/fs/direct-io.c
> index 62c97ff9e852..b0aafe640fa4 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;
> --
> 2.39.2
>
--
Jan Kara <jack@...e.com>
SUSE Labs, CR
Powered by blists - more mailing lists