public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
From: Colin King <colin.king@canonical.com>
To: David Howells <dhowells@redhat.com>,
	linux-afs@lists.infradead.org, linux-kernel@vger.kernel.org
Cc: kernel-janitors@vger.kernel.org
Subject: [PATCH] afs: remove redundant assignment of dvnode to itself
Date: Mon, 20 Nov 2017 13:58:20 +0000	[thread overview]
Message-ID: <20171120135820.32596-1-colin.king@canonical.com> (raw)

From: Colin Ian King <colin.king@canonical.com>

The assignment of dvnode to itself is redundant and can be removed.
Cleans up warning detected by cppcheck:

fs/afs/dir.c:975: (warning) Redundant assignment of 'dvnode' to itself.

Fixes: d2ddc776a458 ("afs: Overhaul volume and server record caching and fileserver rotation")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 fs/afs/dir.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/afs/dir.c b/fs/afs/dir.c
index ab618d32554c..a5e121e55e57 100644
--- a/fs/afs/dir.c
+++ b/fs/afs/dir.c
@@ -972,7 +972,7 @@ static int afs_create(struct inode *dir, struct dentry *dentry, umode_t mode,
 	struct afs_fs_cursor fc;
 	struct afs_file_status newstatus;
 	struct afs_callback newcb;
-	struct afs_vnode *dvnode = dvnode = AFS_FS_I(dir);
+	struct afs_vnode *dvnode = AFS_FS_I(dir);
 	struct afs_fid newfid;
 	struct key *key;
 	int ret;
-- 
2.14.1


             reply	other threads:[~2017-11-20 13:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-20 13:58 Colin King [this message]
2017-11-20 22:20 ` [PATCH] afs: remove redundant assignment of dvnode to itself David Howells
2019-05-11 12:36 ` [PATCH] afs: remove redundant assignment to variable ret Colin King
2019-05-11 15:35   ` Joe Perches
2019-05-12  6:56     ` David Howells
2019-05-12  6:55   ` David Howells
2020-05-27 12:06 ` Colin King
2020-07-22 15:22 ` Colin King

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=20171120135820.32596-1-colin.king@canonical.com \
    --to=colin.king@canonical.com \
    --cc=dhowells@redhat.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-afs@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox