linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fs: 9p: remove unneeded variable
@ 2021-11-09 11:43 cgel.zte
  2021-11-09 23:50 ` asmadeus
  0 siblings, 1 reply; 2+ messages in thread
From: cgel.zte @ 2021-11-09 11:43 UTC (permalink / raw)
  To: ericvh
  Cc: lucho, asmadeus, v9fs-developer, linux-kernel, Changcheng Deng,
	Zeal Robot

From: Changcheng Deng <deng.changcheng@zte.com.cn>

Fix the following coccicheck review:
./fs/9p/vfs_file.c: 117: 5-8: Unneeded variable

Remove unneeded variable used to store return value.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Changcheng Deng <deng.changcheng@zte.com.cn>
---
 fs/9p/vfs_file.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/fs/9p/vfs_file.c b/fs/9p/vfs_file.c
index aac46c5e5bba..eec8cf646a52 100644
--- a/fs/9p/vfs_file.c
+++ b/fs/9p/vfs_file.c
@@ -116,7 +116,6 @@ int v9fs_file_open(struct inode *inode, struct file *file)
 
 static int v9fs_file_lock(struct file *filp, int cmd, struct file_lock *fl)
 {
-	int res = 0;
 	struct inode *inode = file_inode(filp);
 
 	p9_debug(P9_DEBUG_VFS, "filp: %p lock: %p\n", filp, fl);
@@ -126,7 +125,7 @@ static int v9fs_file_lock(struct file *filp, int cmd, struct file_lock *fl)
 		invalidate_mapping_pages(&inode->i_data, 0, -1);
 	}
 
-	return res;
+	return 0;
 }
 
 static int v9fs_file_do_lock(struct file *filp, int cmd, struct file_lock *fl)
-- 
2.25.1


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

* Re: [PATCH] fs: 9p: remove unneeded variable
  2021-11-09 11:43 [PATCH] fs: 9p: remove unneeded variable cgel.zte
@ 2021-11-09 23:50 ` asmadeus
  0 siblings, 0 replies; 2+ messages in thread
From: asmadeus @ 2021-11-09 23:50 UTC (permalink / raw)
  To: cgel.zte
  Cc: ericvh, lucho, v9fs-developer, linux-kernel, Changcheng Deng, Zeal Robot

cgel.zte@gmail.com wrote on Tue, Nov 09, 2021 at 11:43:43AM +0000:
> From: Changcheng Deng <deng.changcheng@zte.com.cn>
> 
> Fix the following coccicheck review:
> ./fs/9p/vfs_file.c: 117: 5-8: Unneeded variable
> 
> Remove unneeded variable used to store return value.
> 
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: Changcheng Deng <deng.changcheng@zte.com.cn>

Sure, why not.
Queueing this patch.

-- 
Dominique Martinet

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

end of thread, other threads:[~2021-11-09 23:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-09 11:43 [PATCH] fs: 9p: remove unneeded variable cgel.zte
2021-11-09 23:50 ` asmadeus

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