]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
tipc: remove unnecessary INIT_LIST_HEAD
authorYing Xue <ying.xue@windriver.com>
Tue, 2 Dec 2014 07:00:29 +0000 (15:00 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 9 Dec 2014 01:39:57 +0000 (20:39 -0500)
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 <ying.xue@windriver.com>
Reviewed-by: Erik Hugne <erik.hugne@ericsson.com>
Reviewed-by: Jon Maloy <jon.maloy@ericsson.com>
Tested-by: Erik Hugne <erik.hugne@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tipc/name_table.c
net/tipc/subscr.c

index bc3e7ed800008b2a14378f5ec35469746610a72d..3c2e0c300fe2883ef58b11d9799288700ab500e3 100644 (file)
@@ -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;
 }
 
index 31b5cb232a4371e3728ed9e7b934c3560f9ed92c..0344206b984f7f168a742726e8ad853940ff9cec 100644 (file)
@@ -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;