Re: [PATCH] fs/coda: remove useless varible 'err'

From: Jan Harkes
Date: Mon Nov 09 2020 - 09:41:47 EST


On Fri, Nov 06, 2020 at 10:57:08PM +0800, Alex Shi wrote:
> The variable is unused and cause gcc warning:
> fs/coda/file.c:241:6: warning: variable ‘err’ set but not used
> [-Wunused-but-set-variable]
> So let's remove it.
> Signed-off-by: Alex Shi <alex.shi@xxxxxxxxxxxxxxxxx>
> Cc: Jan Harkes <jaharkes@xxxxxxxxxx>
> Cc: coda@xxxxxxxxxx
> Cc: codalist@xxxxxxxxxxxxxxx
> Cc: linux-kernel@xxxxxxxxxxxxxxx

Looks good to me.

Acked-by: Jan Harkes <jaharkes@xxxxxxxxxx>

> ---
> fs/coda/file.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/fs/coda/file.c b/fs/coda/file.c
> index 128d63df5bfb..31a7ba383cb2 100644
> --- a/fs/coda/file.c
> +++ b/fs/coda/file.c
> @@ -238,11 +238,10 @@ int coda_release(struct inode *coda_inode, struct file *coda_file)
> struct coda_file_info *cfi;
> struct coda_inode_info *cii;
> struct inode *host_inode;
> - int err;
>
> cfi = coda_ftoc(coda_file);
>
> - err = venus_close(coda_inode->i_sb, coda_i2f(coda_inode),
> + venus_close(coda_inode->i_sb, coda_i2f(coda_inode),
> coda_flags, coda_file->f_cred->fsuid);
>
> host_inode = file_inode(cfi->cfi_container);
> --
> 1.8.3.1
>
>