linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fs/coda: remove useless varible 'err'
@ 2020-11-06 14:57 Alex Shi
  2020-11-09 14:41 ` Jan Harkes
  0 siblings, 1 reply; 2+ messages in thread
From: Alex Shi @ 2020-11-06 14:57 UTC (permalink / raw)
  Cc: Jan Harkes, coda, codalist, linux-kernel

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@linux.alibaba.com>
Cc: Jan Harkes <jaharkes@cs.cmu.edu> 
Cc: coda@cs.cmu.edu 
Cc: codalist@coda.cs.cmu.edu 
Cc: linux-kernel@vger.kernel.org 
---
 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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] fs/coda: remove useless varible 'err'
  2020-11-06 14:57 [PATCH] fs/coda: remove useless varible 'err' Alex Shi
@ 2020-11-09 14:41 ` Jan Harkes
  0 siblings, 0 replies; 2+ messages in thread
From: Jan Harkes @ 2020-11-09 14:41 UTC (permalink / raw)
  To: Alex Shi; +Cc: linux-kernel

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@linux.alibaba.com>
> Cc: Jan Harkes <jaharkes@cs.cmu.edu> 
> Cc: coda@cs.cmu.edu 
> Cc: codalist@coda.cs.cmu.edu 
> Cc: linux-kernel@vger.kernel.org 

Looks good to me.

Acked-by: Jan Harkes <jaharkes@cs.cmu.edu>

> ---
>  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
> 
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-11-09 14:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-06 14:57 [PATCH] fs/coda: remove useless varible 'err' Alex Shi
2020-11-09 14:41 ` Jan Harkes

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).