提交 834caafa 编写于 作者: Y Ying Xue 提交者: David S. Miller

tipc: remove unnecessary INIT_LIST_HEAD

When a list_head variable is seen as a new entry to be added to a
list head, it's unnecessary to be initialized with INIT_LIST_HEAD().
Signed-off-by: NYing Xue <ying.xue@windriver.com>
Reviewed-by: NErik Hugne <erik.hugne@ericsson.com>
Reviewed-by: NJon Maloy <jon.maloy@ericsson.com>
Tested-by: NErik Hugne <erik.hugne@ericsson.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 5492390a
...@@ -131,9 +131,7 @@ static struct publication *publ_create(u32 type, u32 lower, u32 upper, ...@@ -131,9 +131,7 @@ static struct publication *publ_create(u32 type, u32 lower, u32 upper,
publ->node = node; publ->node = node;
publ->ref = port_ref; publ->ref = port_ref;
publ->key = key; publ->key = key;
INIT_LIST_HEAD(&publ->local_list);
INIT_LIST_HEAD(&publ->pport_list); INIT_LIST_HEAD(&publ->pport_list);
INIT_LIST_HEAD(&publ->nodesub_list);
return publ; return publ;
} }
......
...@@ -305,7 +305,6 @@ static int subscr_subscribe(struct tipc_subscr *s, ...@@ -305,7 +305,6 @@ static int subscr_subscribe(struct tipc_subscr *s,
kfree(sub); kfree(sub);
return -EINVAL; return -EINVAL;
} }
INIT_LIST_HEAD(&sub->nameseq_list);
list_add(&sub->subscription_list, &subscriber->subscription_list); list_add(&sub->subscription_list, &subscriber->subscription_list);
sub->subscriber = subscriber; sub->subscriber = subscriber;
sub->swap = swap; sub->swap = swap;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册