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

usbip: vudc: 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.

LIST_HEAD() helps to clean up the code "struct list_head vudc_devices =",
only to care about the variable 'vudc_devices'.

Reviewed-by: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: Cai Huoqing <cai.huoqing@linux.dev>
Link: https://lore.kernel.org/r/20220211012807.7415-1-cai.huoqing@linux.dev
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Cai Huoqing and committed by
Greg Kroah-Hartman
4378e427 18819ad2

+1 -1
+1 -1
drivers/usb/usbip/vudc_main.c
··· 26 26 }, 27 27 }; 28 28 29 - static struct list_head vudc_devices = LIST_HEAD_INIT(vudc_devices); 29 + static LIST_HEAD(vudc_devices); 30 30 31 31 static int __init init(void) 32 32 {