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

[S390] use LIST_HEAD instead of LIST_HEAD_INIT

single list_head variable initialized with LIST_HEAD_INIT could almost
always can be replaced with LIST_HEAD declaration, this shrinks the code
and looks better.

Signed-off-by: Denis Cheng <crquan@gmail.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>

authored by

Denis Cheng and committed by
Martin Schwidefsky
c11ca97e c6547497

+7 -8
+1 -1
arch/s390/mm/extmem.c
··· 83 83 }; 84 84 85 85 static DEFINE_MUTEX(dcss_lock); 86 - static struct list_head dcss_list = LIST_HEAD_INIT(dcss_list); 86 + static LIST_HEAD(dcss_list); 87 87 static char *segtype_string[] = { "SW", "EW", "SR", "ER", "SN", "EN", "SC", 88 88 "EW/EN-MIXED" }; 89 89
+1 -1
drivers/s390/block/dcssblk.c
··· 82 82 struct request_queue *dcssblk_queue; 83 83 }; 84 84 85 - static struct list_head dcssblk_devices = LIST_HEAD_INIT(dcssblk_devices); 85 + static LIST_HEAD(dcssblk_devices); 86 86 static struct rw_semaphore dcssblk_devices_sem; 87 87 88 88 /*
+2 -2
drivers/s390/char/raw3270.c
··· 66 66 static DEFINE_MUTEX(raw3270_mutex); 67 67 68 68 /* List of 3270 devices. */ 69 - static struct list_head raw3270_devices = LIST_HEAD_INIT(raw3270_devices); 69 + static LIST_HEAD(raw3270_devices); 70 70 71 71 /* 72 72 * Flag to indicate if the driver has been registered. Some operations ··· 1210 1210 void (*notifier)(int, int); 1211 1211 }; 1212 1212 1213 - static struct list_head raw3270_notifier = LIST_HEAD_INIT(raw3270_notifier); 1213 + static LIST_HEAD(raw3270_notifier); 1214 1214 1215 1215 int raw3270_register_notifier(void (*notifier)(int, int)) 1216 1216 {
+1 -1
drivers/s390/char/tape_core.c
··· 37 37 * we can assign the devices to minor numbers of the same major 38 38 * The list is protected by the rwlock 39 39 */ 40 - static struct list_head tape_device_list = LIST_HEAD_INIT(tape_device_list); 40 + static LIST_HEAD(tape_device_list); 41 41 static DEFINE_RWLOCK(tape_device_lock); 42 42 43 43 /*
+1 -2
drivers/s390/net/netiucv.c
··· 198 198 /** 199 199 * Linked list of all connection structs. 200 200 */ 201 - static struct list_head iucv_connection_list = 202 - LIST_HEAD_INIT(iucv_connection_list); 201 + static LIST_HEAD(iucv_connection_list); 203 202 static DEFINE_RWLOCK(iucv_connection_rwlock); 204 203 205 204 /**
+1 -1
drivers/s390/net/smsgiucv.c
··· 42 42 static struct iucv_path *smsg_path; 43 43 44 44 static DEFINE_SPINLOCK(smsg_list_lock); 45 - static struct list_head smsg_list = LIST_HEAD_INIT(smsg_list); 45 + static LIST_HEAD(smsg_list); 46 46 47 47 static int smsg_path_pending(struct iucv_path *, u8 ipvmid[8], u8 ipuser[16]); 48 48 static void smsg_message_pending(struct iucv_path *, struct iucv_message *);