From: Ying Xue Date: Tue, 2 Dec 2014 07:00:29 +0000 (+0800) Subject: tipc: remove unnecessary INIT_LIST_HEAD X-Git-Tag: v4.9.8~5202^2~87^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=834caafa3e61f63805738376fa9c02dc0c1eb224;p=platform%2Fkernel%2Flinux-rpi3.git 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: Ying Xue Reviewed-by: Erik Hugne Reviewed-by: Jon Maloy Tested-by: Erik Hugne Signed-off-by: David S. Miller --- diff --git a/net/tipc/name_table.c b/net/tipc/name_table.c index bc3e7ed..3c2e0c3 100644 --- a/net/tipc/name_table.c +++ b/net/tipc/name_table.c @@ -131,9 +131,7 @@ static struct publication *publ_create(u32 type, u32 lower, u32 upper, publ->node = node; publ->ref = port_ref; publ->key = key; - INIT_LIST_HEAD(&publ->local_list); INIT_LIST_HEAD(&publ->pport_list); - INIT_LIST_HEAD(&publ->nodesub_list); return publ; } diff --git a/net/tipc/subscr.c b/net/tipc/subscr.c index 31b5cb2..0344206 100644 --- a/net/tipc/subscr.c +++ b/net/tipc/subscr.c @@ -305,7 +305,6 @@ static int subscr_subscribe(struct tipc_subscr *s, kfree(sub); return -EINVAL; } - INIT_LIST_HEAD(&sub->nameseq_list); list_add(&sub->subscription_list, &subscriber->subscription_list); sub->subscriber = subscriber; sub->swap = swap;