From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============7870893511286486512==" MIME-Version: 1.0 From: kernel test robot To: kbuild-all@lists.01.org Subject: [PATCH] scripts/dtc: fix returnvar.cocci warnings Date: Fri, 21 May 2021 02:28:32 +0800 Message-ID: <20210520182832.GA65085@ad678c5af442> In-Reply-To: <202105210256.1Q2XDf1M-lkp@intel.com> List-Id: --===============7870893511286486512== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: kernel test robot 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 Signed-off-by: kernel test robot --- tree: https://android.googlesource.com/kernel/goldfish android-3.18 head: dd54b61f1458c03f68fc019b4874d98f2f0ae3a5 commit: 8214bf079208b146e63cd0a3ce0ed335a87ce7b3 [396/1051] scripts/dtc: Ex= port 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 =3D 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 !=3D 0); = - return o2dlm_flags; + return 0; } #undef map_flag =20 --===============7870893511286486512==--