Skip to contentSkip to conversation

fs/coda: remove useless varible 'err'

PATCH In review Alex Shi 2 participants 2 messages Nov 6, 2020 – Nov 9, 2020 Coda file system

lore
Share & tools
lore

Alex Shi

author
#0 lore raw

PATCH 1/1 fs/coda: remove useless varible 'err'

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.

---
 fs/coda/file.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
fs/coda/file.c +1 -2
index 128d63df5bfb..31a7ba383cb2 100644
@@ -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);
Signature · 1 line
1.8.3.1
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 9 lines · Alex Shi

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.

Looks good to me.

Quoted 25 lines
---
 fs/coda/file.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
fs/coda/file.c +1 -2
index 128d63df5bfb..31a7ba383cb2 100644
@@ -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);
Signature · 1 line
1.8.3.1