linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fs:ocfs2:remove unneeded variable 'o2dlm_flags'
@ 2020-04-22  7:12 Wu Bo
  2020-04-22  7:52 ` Joseph Qi
  2020-04-24 18:22 ` kbuild test robot
  0 siblings, 2 replies; 4+ messages in thread
From: Wu Bo @ 2020-04-22  7:12 UTC (permalink / raw)
  To: mark, jlbec, joseph.qi
  Cc: linux-kernel, ocfs2-devel, liuzhiqiang26, linfeilong, wubo40

Fix the following coccicheck warning:
fs/ocfs2/stack_o2cb.c:69:5-16: Unneeded variable: "o2dlm_flags". 
Return "0" on line 84

Signed-off-by: Wu Bo <wubo40@huawei.com>
---
 fs/ocfs2/stack_o2cb.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/fs/ocfs2/stack_o2cb.c b/fs/ocfs2/stack_o2cb.c
index dbf8b57..2da9633 100644
--- a/fs/ocfs2/stack_o2cb.c
+++ b/fs/ocfs2/stack_o2cb.c
@@ -66,8 +66,6 @@ static inline int mode_to_o2dlm(int mode)
 	}
 static int flags_to_o2dlm(u32 flags)
 {
-	int o2dlm_flags = 0;
-
 	map_flag(DLM_LKF_NOQUEUE, LKM_NOQUEUE);
 	map_flag(DLM_LKF_CANCEL, LKM_CANCEL);
 	map_flag(DLM_LKF_CONVERT, LKM_CONVERT);
@@ -81,7 +79,7 @@ static int flags_to_o2dlm(u32 flags)
 	/* map_flag() should have cleared every flag passed in */
 	BUG_ON(flags != 0);
 
-	return o2dlm_flags;
+	return 0;
 }
 #undef map_flag
 
-- 
1.8.3.1


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

end of thread, other threads:[~2020-04-24 18:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-22  7:12 [PATCH] fs:ocfs2:remove unneeded variable 'o2dlm_flags' Wu Bo
2020-04-22  7:52 ` Joseph Qi
2020-04-22  7:59   ` Wu Bo
2020-04-24 18:22 ` kbuild test robot

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