Re: [PATCH] cifs: remove redundant duplicated assignment of pointer 'node'
merged into cifs-2.6.git for-next thx On Wed, Jan 17, 2018 at 5:11 PM, Ronnie Sahlberg <lsahl...@redhat.com> wrote: > Reviewed-by: Ronnie Sahlberg <lsahl...@redhat.com> > > > - Original Message - > From: "Colin King" <colin.k...@canonical.com> > To: "Steve French" <sfre...@samba.org>, linux-c...@vger.kernel.org, > samba-techni...@lists.samba.org > Cc: kernel-janit...@vger.kernel.org, linux-kernel@vger.kernel.org > Sent: Wednesday, 17 January, 2018 8:52:39 PM > Subject: [PATCH] cifs: remove redundant duplicated assignment of pointer > 'node' > > From: Colin Ian King <colin.k...@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.k...@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 = _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 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-cifs" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > -- > To unsubscribe from this list: send the line "unsubscribe linux-cifs" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- Thanks, Steve
Re: [PATCH] cifs: remove redundant duplicated assignment of pointer 'node'
merged into cifs-2.6.git for-next thx On Wed, Jan 17, 2018 at 5:11 PM, Ronnie Sahlberg wrote: > Reviewed-by: Ronnie Sahlberg > > > - Original Message - > From: "Colin King" > To: "Steve French" , linux-c...@vger.kernel.org, > samba-techni...@lists.samba.org > Cc: kernel-janit...@vger.kernel.org, linux-kernel@vger.kernel.org > Sent: Wednesday, 17 January, 2018 8:52:39 PM > Subject: [PATCH] cifs: remove redundant duplicated assignment of pointer > 'node' > > From: Colin Ian King > > 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 > --- > 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 = _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 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-cifs" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > -- > To unsubscribe from this list: send the line "unsubscribe linux-cifs" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- Thanks, Steve
Re: [PATCH] cifs: remove redundant duplicated assignment of pointer 'node'
Reviewed-by: Ronnie Sahlberg <lsahl...@redhat.com> - Original Message - From: "Colin King" <colin.k...@canonical.com> To: "Steve French" <sfre...@samba.org>, linux-c...@vger.kernel.org, samba-techni...@lists.samba.org Cc: kernel-janit...@vger.kernel.org, linux-kernel@vger.kernel.org Sent: Wednesday, 17 January, 2018 8:52:39 PM Subject: [PATCH] cifs: remove redundant duplicated assignment of pointer 'node' From: Colin Ian King <colin.k...@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.k...@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 = _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 -- To unsubscribe from this list: send the line "unsubscribe linux-cifs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] cifs: remove redundant duplicated assignment of pointer 'node'
Reviewed-by: Ronnie Sahlberg - Original Message - From: "Colin King" To: "Steve French" , linux-c...@vger.kernel.org, samba-techni...@lists.samba.org Cc: kernel-janit...@vger.kernel.org, linux-kernel@vger.kernel.org Sent: Wednesday, 17 January, 2018 8:52:39 PM Subject: [PATCH] cifs: remove redundant duplicated assignment of pointer 'node' From: Colin Ian King 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 --- 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 = _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 -- To unsubscribe from this list: send the line "unsubscribe linux-cifs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] cifs: remove redundant duplicated assignment of pointer 'node'
From: Colin Ian KingNode 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 --- 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 = _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
[PATCH] cifs: remove redundant duplicated assignment of pointer 'node'
From: Colin Ian King 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 --- 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 = _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