From: Cai Huoqing Date: Wed, 9 Feb 2022 03:26:43 +0000 (+0800) Subject: staging: most: net: Make use of the helper macro LIST_HEAD() X-Git-Tag: v5.18-rc1~81^2~199 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b7b3c35e8791ca77dec16f35a6c6a84b5922ecc2;p=thirdparty%2Fkernel%2Fstable.git staging: most: net: Make use of the helper macro LIST_HEAD() Replace "struct list_head head = LIST_HEAD_INIT(head)" with "LIST_HEAD(head)" to simplify the code. Signed-off-by: Cai Huoqing Link: https://lore.kernel.org/r/20220209032645.38305-1-cai.huoqing@linux.dev Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/most/net/net.c b/drivers/staging/most/net/net.c index 47039f0d262f7..1d1fe8bff7ee4 100644 --- a/drivers/staging/most/net/net.c +++ b/drivers/staging/most/net/net.c @@ -67,7 +67,7 @@ struct net_dev_context { struct list_head list; }; -static struct list_head net_devices = LIST_HEAD_INIT(net_devices); +static LIST_HEAD(net_devices); static DEFINE_MUTEX(probe_disc_mt); /* ch->linked = true, most_nd_open */ static DEFINE_SPINLOCK(list_lock); /* list_head, ch->linked = false, dev_hold */ static struct most_component comp;