public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] afs: remove redundant assignment of dvnode to itself
@ 2017-11-20 13:58 Colin King
  2017-11-20 22:20 ` David Howells
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Colin King @ 2017-11-20 13:58 UTC (permalink / raw)
  To: David Howells, linux-afs, linux-kernel; +Cc: kernel-janitors

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


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-07-22 15:22 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-20 13:58 [PATCH] afs: remove redundant assignment of dvnode to itself Colin King
2017-11-20 22:20 ` 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox