Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <cai.huoqing@linux.dev>
Link: https://lore.kernel.org/r/20220209032645.38305-1-cai.huoqing@linux.dev
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Cai Huoqing and committed by
Greg Kroah-Hartman
b7b3c35e d6ef48e5

+1 -1
+1 -1
drivers/staging/most/net/net.c
··· 67 67 struct list_head list; 68 68 }; 69 69 70 - static struct list_head net_devices = LIST_HEAD_INIT(net_devices); 70 + static LIST_HEAD(net_devices); 71 71 static DEFINE_MUTEX(probe_disc_mt); /* ch->linked = true, most_nd_open */ 72 72 static DEFINE_SPINLOCK(list_lock); /* list_head, ch->linked = false, dev_hold */ 73 73 static struct most_component comp;