From: kernel test robot <lkp(a)intel.com>
fs/ocfs2/stack_o2cb.c:77:5-16: Unneeded variable: "o2dlm_flags". Return
"0" on line 92
Removes unneeded variable used to store return value.
Generated by: scripts/coccinelle/misc/returnvar.cocci
Fixes: 8214bf079208 ("scripts/dtc: Export YYLOC global declaration")
Reported-by: kernel test robot <lkp(a)intel.com>
Signed-off-by: kernel test robot <lkp(a)intel.com>
---
tree:
https://android.googlesource.com/kernel/goldfish android-3.18
head: dd54b61f1458c03f68fc019b4874d98f2f0ae3a5
commit: 8214bf079208b146e63cd0a3ce0ed335a87ce7b3 [396/1051] scripts/dtc: Export YYLOC
global declaration
:::::: branch date: 5 weeks ago
:::::: commit date: 3 months ago
stack_o2cb.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
--- a/fs/ocfs2/stack_o2cb.c
+++ b/fs/ocfs2/stack_o2cb.c
@@ -74,8 +74,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);
@@ -89,7 +87,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