cifs: fix some unused variable warnings in id_rb_search
Subsystems (2)
PATCH 1/1 cifs: fix some unused variable warnings in id_rb_search
fs/cifs/cifsacl.c: In function ‘id_rb_search’:fs/cifs/cifsacl.c:215:19: warning: variable ‘linkto’ set but not used [-Wunused-but-set-variable]fs/cifs/cifsacl.c:214:18: warning: variable ‘parent’ set but not used [-Wunused-but-set-variable]
--- fs/cifs/cifsacl.c | 5 ----- 1 files changed, 0 insertions(+), 5 deletions(-)
fs/cifs/cifsacl.c +0 -5
@@ -211,19 +211,14 @@ id_rb_search(struct rb_root *root, struct cifs_sid *sidptr) {int rc;struct rb_node *node = root->rb_node; -struct rb_node *parent =NULL ; -struct rb_node **linkto = &(root->rb_node);struct cifs_sid_id *lsidid;while (node) { lsidid = rb_entry(node, struct cifs_sid_id, rbnode); - parent = node; rc =compare_sids (sidptr, &((lsidid)->sid));if (rc >0 ) { - linkto = &(node->rb_left); node = node->rb_left; }else if (rc <0 ) { - linkto = &(node->rb_right); node = node->rb_right; }else /* node found */ return lsidid;
Signature · 1 line
1.7.4.4
A message that is not in the archive (sent off-list or not yet received): 1304510899-30360-1-git-send-email-jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
Shirish Pargaonkar
Reviewed-byQuoted 37 lines · Jeff Layton
fs/cifs/cifsacl.c: In function ‘id_rb_search’:fs/cifs/cifsacl.c:215:19: warning: variable ‘linkto’ set but not used [-Wunused-but-set-variable]fs/cifs/cifsacl.c:214:18: warning: variable ‘parent’ set but not used [-Wunused-but-set-variable]Cc Shirish Pargaonkar <[email protected]>Signed-off-by Jeff Layton <[email protected]>---
fs/cifs/cifsacl.c | 5 -----1 files changed, 0 insertions(+), 5 deletions(-)fs/cifs/cifsacl.c +0
-6@@ -211,19 +211,14 @@ id_rb_search(struct rb_root *root, struct cifs_sid *sidptr) { int rc; struct rb_node *node = root->rb_node; - struct rb_node *parent = NULL; - struct rb_node **linkto = &(root->rb_node); struct cifs_sid_id *lsidid; while (node) { lsidid = rb_entry(node, struct cifs_sid_id, rbnode); - parent = node; rc = compare_sids(sidptr, &((lsidid)->sid)); if (rc > 0) { - linkto = &(node->rb_left); node = node->rb_left; } else if (rc < 0) { - linkto = &(node->rb_right); node = node->rb_right; } else /* node found */ return lsidid; --
Quoted 3 lines
1.7.4.4
Looks correct.
merged.
Quoted 40 lines · Jeff Layton
fs/cifs/cifsacl.c: In function ‘id_rb_search’:fs/cifs/cifsacl.c:215:19: warning: variable ‘linkto’ set but not used [-Wunused-but-set-variable]fs/cifs/cifsacl.c:214:18: warning: variable ‘parent’ set but not used [-Wunused-but-set-variable]Cc Shirish Pargaonkar <[email protected]>Signed-off-by Jeff Layton <[email protected]>---
fs/cifs/cifsacl.c | 5 -----1 files changed, 0 insertions(+), 5 deletions(-)fs/cifs/cifsacl.c +0
-6@@ -211,19 +211,14 @@ id_rb_search(struct rb_root *root, struct cifs_sid *sidptr) { int rc; struct rb_node *node = root->rb_node; - struct rb_node *parent = NULL; - struct rb_node **linkto = &(root->rb_node); struct cifs_sid_id *lsidid; while (node) { lsidid = rb_entry(node, struct cifs_sid_id, rbnode); - parent = node; rc = compare_sids(sidptr, &((lsidid)->sid)); if (rc > 0) { - linkto = &(node->rb_left); node = node->rb_left; } else if (rc < 0) { - linkto = &(node->rb_right); node = node->rb_right; } else /* node found */ return lsidid; --1.7.4.4
Signature · 3 lines
Thanks, Steve