public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fs/locks: Remove redundant assignment to cmd
@ 2023-03-08  7:13 Jiapeng Chong
  2023-03-09  1:01 ` Chaitanya Kulkarni
  2023-03-09  9:25 ` Christian Brauner
  0 siblings, 2 replies; 6+ messages in thread
From: Jiapeng Chong @ 2023-03-08  7:13 UTC (permalink / raw)
  To: viro
  Cc: brauner, jlayton, chuck.lever, linux-fsdevel, linux-kernel,
	Jiapeng Chong, Abaci Robot

Variable 'cmd' set but not used.

fs/locks.c:2428:3: warning: Value stored to 'cmd' is never read.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4439
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
 fs/locks.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/fs/locks.c b/fs/locks.c
index 66b4eef09db5..d82c4cacdfb9 100644
--- a/fs/locks.c
+++ b/fs/locks.c
@@ -2425,7 +2425,6 @@ int fcntl_getlk64(struct file *filp, unsigned int cmd, struct flock64 *flock)
 		if (flock->l_pid != 0)
 			goto out;
 
-		cmd = F_GETLK64;
 		fl->fl_flags |= FL_OFDLCK;
 		fl->fl_owner = filp;
 	}
-- 
2.20.1.7.g153144c


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

end of thread, other threads:[~2023-03-10  9:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-08  7:13 [PATCH] fs/locks: Remove redundant assignment to cmd Jiapeng Chong
2023-03-09  1:01 ` Chaitanya Kulkarni
2023-03-09  9:25 ` Christian Brauner
2023-03-09 11:50   ` Jeff Layton
2023-03-10  3:40     ` Al Viro
2023-03-10  8:52       ` Christian Brauner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox