From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============6409643898105446272==" MIME-Version: 1.0 From: kernel test robot Subject: [PATCH] cifs: fix returnvar.cocci warnings Date: Sat, 12 Dec 2020 08:47:59 +0800 Message-ID: <20201212004759.GA23154@0f0fbbf9fb9e> In-Reply-To: <202012120814.pRiAmhm4-lkp@intel.com> List-Id: To: kbuild@lists.01.org --===============6409643898105446272== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable CC: kbuild-all(a)lists.01.org CC: linux-cifs(a)vger.kernel.org CC: samba-technical(a)lists.samba.org TO: Ronnie Sahlberg CC: Steve French CC: linux-cifs(a)vger.kernel.org CC: samba-technical(a)lists.samba.org CC: linux-kernel(a)vger.kernel.org From: kernel test robot fs/cifs/fs_context.c:238:5-7: Unneeded variable: "rc". Return "0" on line 2= 61 Remove unneeded variable used to store return value. Generated by: scripts/coccinelle/misc/returnvar.cocci Fixes: 8dd343e73246 ("cifs: rename dup_vol to smb3_fs_context_dup and move = it into fs_context.c") CC: Ronnie Sahlberg Reported-by: kernel test robot Signed-off-by: kernel test robot --- tree: git://git.samba.org/sfrench/cifs-2.6.git for-next head: 2dc7338d009dd9e5986121b2eae0178082eed5a1 commit: 8dd343e732466a0dd040898bddefd4e1c556dd10 [9/15] cifs: rename dup_vo= l to smb3_fs_context_dup and move it into fs_context.c :::::: branch date: 3 hours ago :::::: commit date: 3 hours ago Please take the patch only if it's a positive warning. Thanks! fs_context.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) --- a/fs/cifs/fs_context.c +++ b/fs/cifs/fs_context.c @@ -235,8 +235,6 @@ do { \ int smb3_fs_context_dup(struct smb3_fs_context *new_ctx, struct smb3_fs_contex= t *ctx) { - int rc =3D 0; - memcpy(new_ctx, ctx, sizeof(*ctx)); new_ctx->prepath =3D NULL; new_ctx->local_nls =3D NULL; @@ -258,5 +256,5 @@ smb3_fs_context_dup(struct smb3_fs_conte DUP_CTX_STR(nodename); DUP_CTX_STR(iocharset); = - return rc; + return 0; } --===============6409643898105446272==--