aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc
diff options
context:
space:
mode:
Diffstat (limited to 'net/tipc')
-rw-r--r--net/tipc/name_table.c8
-rw-r--r--net/tipc/node.c3
2 files changed, 4 insertions, 7 deletions
diff --git a/net/tipc/name_table.c b/net/tipc/name_table.c
index 46754779fd3d..24b167914311 100644
--- a/net/tipc/name_table.c
+++ b/net/tipc/name_table.c
@@ -473,11 +473,10 @@ static void tipc_nameseq_subscribe(struct name_seq *nseq,
473static struct name_seq *nametbl_find_seq(u32 type) 473static struct name_seq *nametbl_find_seq(u32 type)
474{ 474{
475 struct hlist_head *seq_head; 475 struct hlist_head *seq_head;
476 struct hlist_node *seq_node;
477 struct name_seq *ns; 476 struct name_seq *ns;
478 477
479 seq_head = &table.types[hash(type)]; 478 seq_head = &table.types[hash(type)];
480 hlist_for_each_entry(ns, seq_node, seq_head, ns_list) { 479 hlist_for_each_entry(ns, seq_head, ns_list) {
481 if (ns->type == type) 480 if (ns->type == type)
482 return ns; 481 return ns;
483 } 482 }
@@ -853,7 +852,6 @@ static int nametbl_list(char *buf, int len, u32 depth_info,
853 u32 type, u32 lowbound, u32 upbound) 852 u32 type, u32 lowbound, u32 upbound)
854{ 853{
855 struct hlist_head *seq_head; 854 struct hlist_head *seq_head;
856 struct hlist_node *seq_node;
857 struct name_seq *seq; 855 struct name_seq *seq;
858 int all_types; 856 int all_types;
859 int ret = 0; 857 int ret = 0;
@@ -873,7 +871,7 @@ static int nametbl_list(char *buf, int len, u32 depth_info,
873 upbound = ~0; 871 upbound = ~0;
874 for (i = 0; i < TIPC_NAMETBL_SIZE; i++) { 872 for (i = 0; i < TIPC_NAMETBL_SIZE; i++) {
875 seq_head = &table.types[i]; 873 seq_head = &table.types[i];
876 hlist_for_each_entry(seq, seq_node, seq_head, ns_list) { 874 hlist_for_each_entry(seq, seq_head, ns_list) {
877 ret += nameseq_list(seq, buf + ret, len - ret, 875 ret += nameseq_list(seq, buf + ret, len - ret,
878 depth, seq->type, 876 depth, seq->type,
879 lowbound, upbound, i); 877 lowbound, upbound, i);
@@ -889,7 +887,7 @@ static int nametbl_list(char *buf, int len, u32 depth_info,
889 ret += nametbl_header(buf + ret, len - ret, depth); 887 ret += nametbl_header(buf + ret, len - ret, depth);
890 i = hash(type); 888 i = hash(type);
891 seq_head = &table.types[i]; 889 seq_head = &table.types[i];
892 hlist_for_each_entry(seq, seq_node, seq_head, ns_list) { 890 hlist_for_each_entry(seq, seq_head, ns_list) {
893 if (seq->type == type) { 891 if (seq->type == type) {
894 ret += nameseq_list(seq, buf + ret, len - ret, 892 ret += nameseq_list(seq, buf + ret, len - ret,
895 depth, type, 893 depth, type,
diff --git a/net/tipc/node.c b/net/tipc/node.c
index 48f39dd3eae8..6e6c434872e8 100644
--- a/net/tipc/node.c
+++ b/net/tipc/node.c
@@ -69,12 +69,11 @@ static unsigned int tipc_hashfn(u32 addr)
69struct tipc_node *tipc_node_find(u32 addr) 69struct tipc_node *tipc_node_find(u32 addr)
70{ 70{
71 struct tipc_node *node; 71 struct tipc_node *node;
72 struct hlist_node *pos;
73 72
74 if (unlikely(!in_own_cluster_exact(addr))) 73 if (unlikely(!in_own_cluster_exact(addr)))
75 return NULL; 74 return NULL;
76 75
77 hlist_for_each_entry(node, pos, &node_htable[tipc_hashfn(addr)], hash) { 76 hlist_for_each_entry(node, &node_htable[tipc_hashfn(addr)], hash) {
78 if (node->addr == addr) 77 if (node->addr == addr)
79 return node; 78 return node;
80 } 79 }