From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: [PATCH] cifs: fix returnvar.cocci warnings
Date: Sat, 12 Dec 2020 08:47:59 +0800 [thread overview]
Message-ID: <20201212004759.GA23154@0f0fbbf9fb9e> (raw)
In-Reply-To: <202012120814.pRiAmhm4-lkp@intel.com>
[-- Attachment #1: Type: text/plain, Size: 1688 bytes --]
CC: kbuild-all(a)lists.01.org
CC: linux-cifs(a)vger.kernel.org
CC: samba-technical(a)lists.samba.org
TO: Ronnie Sahlberg <lsahlber@redhat.com>
CC: Steve French <stfrench@microsoft.com>
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 <lkp@intel.com>
fs/cifs/fs_context.c:238:5-7: Unneeded variable: "rc". Return "0" on line 261
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 <lsahlber@redhat.com>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---
tree: git://git.samba.org/sfrench/cifs-2.6.git for-next
head: 2dc7338d009dd9e5986121b2eae0178082eed5a1
commit: 8dd343e732466a0dd040898bddefd4e1c556dd10 [9/15] cifs: rename dup_vol 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_context *ctx)
{
- int rc = 0;
-
memcpy(new_ctx, ctx, sizeof(*ctx));
new_ctx->prepath = NULL;
new_ctx->local_nls = 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;
}
prev parent reply other threads:[~2020-12-12 0:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-12 0:47 [cifs:for-next 9/15] fs/cifs/fs_context.c:238:5-7: Unneeded variable: "rc". Return "0" on line 261 kernel test robot
2020-12-12 0:47 ` kernel test robot [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201212004759.GA23154@0f0fbbf9fb9e \
--to=lkp@intel.com \
--cc=kbuild@lists.01.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.