linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] coda: Remove set but not used variable 'err'
@ 2021-05-27  9:05 Baokun Li
  2021-06-15  1:58 ` libaokun (A)
  0 siblings, 1 reply; 2+ messages in thread
From: Baokun Li @ 2021-05-27  9:05 UTC (permalink / raw)
  To: jaharkes, coda, codalist, linux-kernel
  Cc: weiyongjun1, yuehaibing, yangjihong1, yukuai3, libaokun1

Fixes gcc '-Wunused-but-set-variable' warning:

fs/coda/file.c: In function 'coda_release':
fs/coda/file.c:241:6: warning:
 variable ‘err’ set but not used [-Wunused-but-set-variable]

It never used since introduction.

Signed-off-by: Baokun Li <libaokun1@huawei.com>
---
 fs/coda/file.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/fs/coda/file.c b/fs/coda/file.c
index ef5ca22bfb3e..98eb543d4acc 100644
--- a/fs/coda/file.c
+++ b/fs/coda/file.c
@@ -238,12 +238,11 @@ 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),
-			  coda_flags, coda_file->f_cred->fsuid);
+	venus_close(coda_inode->i_sb, coda_i2f(coda_inode),
+		    coda_flags, coda_file->f_cred->fsuid);
 
 	host_inode = file_inode(cfi->cfi_container);
 	cii = ITOC(coda_inode);
-- 
2.25.4


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

* Re: [PATCH -next] coda: Remove set but not used variable 'err'
  2021-05-27  9:05 [PATCH -next] coda: Remove set but not used variable 'err' Baokun Li
@ 2021-06-15  1:58 ` libaokun (A)
  0 siblings, 0 replies; 2+ messages in thread
From: libaokun (A) @ 2021-06-15  1:58 UTC (permalink / raw)
  To: jaharkes, coda, codalist, linux-kernel
  Cc: weiyongjun1, yuehaibing, yangjihong1, yukuai3

ping

在 2021/5/27 17:05, Baokun Li 写道:
> Fixes gcc '-Wunused-but-set-variable' warning:
>
> fs/coda/file.c: In function 'coda_release':
> fs/coda/file.c:241:6: warning:
>   variable ‘err’ set but not used [-Wunused-but-set-variable]
>
> It never used since introduction.
>
> Signed-off-by: Baokun Li <libaokun1@huawei.com>
> ---
>   fs/coda/file.c | 5 ++---
>   1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/fs/coda/file.c b/fs/coda/file.c
> index ef5ca22bfb3e..98eb543d4acc 100644
> --- a/fs/coda/file.c
> +++ b/fs/coda/file.c
> @@ -238,12 +238,11 @@ 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),
> -			  coda_flags, coda_file->f_cred->fsuid);
> +	venus_close(coda_inode->i_sb, coda_i2f(coda_inode),
> +		    coda_flags, coda_file->f_cred->fsuid);
>   
>   	host_inode = file_inode(cfi->cfi_container);
>   	cii = ITOC(coda_inode);

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

end of thread, other threads:[~2021-06-15  2:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-27  9:05 [PATCH -next] coda: Remove set but not used variable 'err' Baokun Li
2021-06-15  1:58 ` libaokun (A)

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