public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] cifs: remove redundant duplicated assignment of pointer 'node'
@ 2018-01-17  9:52 Colin King
       [not found] ` <20180117095239.10670-1-colin.king-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Colin King @ 2018-01-17  9:52 UTC (permalink / raw)
  To: Steve French, linux-cifs, samba-technical; +Cc: kernel-janitors, linux-kernel

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

Node is assigned twice to rb_first(root), first during declaration
time and second after a taking a spin lock, so we have a duplicated
assignment.  Remove the first assignment because it is redundant and
also not protected by the spin lock.

Cleans up clang warning:
fs/cifs/connect.c:4435:18: warning: Value stored to 'node' during
its initialization is never read

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 fs/cifs/connect.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index 0efd22e75ac7..63c5d85fe25e 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -4432,7 +4432,7 @@ cifs_prune_tlinks(struct work_struct *work)
 	struct cifs_sb_info *cifs_sb = container_of(work, struct cifs_sb_info,
 						    prune_tlinks.work);
 	struct rb_root *root = &cifs_sb->tlink_tree;
-	struct rb_node *node = rb_first(root);
+	struct rb_node *node;
 	struct rb_node *tmp;
 	struct tcon_link *tlink;
 
-- 
2.15.1


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

end of thread, other threads:[~2018-01-18 16:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-17  9:52 [PATCH] cifs: remove redundant duplicated assignment of pointer 'node' Colin King
     [not found] ` <20180117095239.10670-1-colin.king-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
2018-01-17 23:11   ` Ronnie Sahlberg
     [not found]     ` <2031352942.702941.1516230683335.JavaMail.zimbra-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2018-01-18 16:17       ` Steve French

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