diff options
author | Vineeth Vijayan <vneethv@linux.ibm.com> | 2021-03-31 16:43:40 +0300 |
---|---|---|
committer | Heiko Carstens <hca@linux.ibm.com> | 2021-04-07 16:24:57 +0300 |
commit | 8bc00c04d87ee151fb8fe18ed7e7af8c785843f2 (patch) | |
tree | adbc5296e0ae6771f548653212caa8bae6dc094c /drivers/s390 | |
parent | 7dd8ed09430465d137330e0810a2a90e06770898 (diff) | |
download | linux-8bc00c04d87ee151fb8fe18ed7e7af8c785843f2.tar.xz |
s390/sclp: use LIST_HEAD for Initialization
For static initialization of list_head variable, use LIST_HEAD
instead of INIT_LIST_HEAD function.
Suggested-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: Vineeth Vijayan <vneethv@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Diffstat (limited to 'drivers/s390')
-rw-r--r-- | drivers/s390/char/sclp.c | 6 | ||||
-rw-r--r-- | drivers/s390/char/sclp_con.c | 6 | ||||
-rw-r--r-- | drivers/s390/char/sclp_tty.c | 6 | ||||
-rw-r--r-- | drivers/s390/char/sclp_vt220.c | 6 |
4 files changed, 8 insertions, 16 deletions
diff --git a/drivers/s390/char/sclp.c b/drivers/s390/char/sclp.c index d2ab3f07c008..986bbbc23d0a 100644 --- a/drivers/s390/char/sclp.c +++ b/drivers/s390/char/sclp.c @@ -37,10 +37,10 @@ static sccb_mask_t sclp_receive_mask; static sccb_mask_t sclp_send_mask; /* List of registered event listeners and senders. */ -static struct list_head sclp_reg_list; +static LIST_HEAD(sclp_reg_list); /* List of queued requests. */ -static struct list_head sclp_req_queue; +static LIST_HEAD(sclp_req_queue); /* Data for read and and init requests. */ static struct sclp_req sclp_read_req; @@ -1178,8 +1178,6 @@ sclp_init(void) sclp_init_sccb = (void *) __get_free_page(GFP_ATOMIC | GFP_DMA); BUG_ON(!sclp_read_sccb || !sclp_init_sccb); /* Set up variables */ - INIT_LIST_HEAD(&sclp_req_queue); - INIT_LIST_HEAD(&sclp_reg_list); list_add(&sclp_state_change_event.list, &sclp_reg_list); timer_setup(&sclp_request_timer, NULL, 0); timer_setup(&sclp_queue_timer, sclp_req_queue_timeout, 0); diff --git a/drivers/s390/char/sclp_con.c b/drivers/s390/char/sclp_con.c index f5e34e1b6c9e..9b852a47ccc1 100644 --- a/drivers/s390/char/sclp_con.c +++ b/drivers/s390/char/sclp_con.c @@ -28,9 +28,9 @@ /* Lock to guard over changes to global variables */ static DEFINE_SPINLOCK(sclp_con_lock); /* List of free pages that can be used for console output buffering */ -static struct list_head sclp_con_pages; +static LIST_HEAD(sclp_con_pages); /* List of full struct sclp_buffer structures ready for output */ -static struct list_head sclp_con_outqueue; +static LIST_HEAD(sclp_con_outqueue); /* Pointer to current console buffer */ static struct sclp_buffer *sclp_conbuf; /* Timer for delayed output of console messages */ @@ -323,12 +323,10 @@ sclp_console_init(void) if (rc) return rc; /* Allocate pages for output buffering */ - INIT_LIST_HEAD(&sclp_con_pages); for (i = 0; i < sclp_console_pages; i++) { page = (void *) get_zeroed_page(GFP_KERNEL | GFP_DMA); list_add_tail(page, &sclp_con_pages); } - INIT_LIST_HEAD(&sclp_con_outqueue); sclp_conbuf = NULL; timer_setup(&sclp_con_timer, sclp_console_timeout, 0); diff --git a/drivers/s390/char/sclp_tty.c b/drivers/s390/char/sclp_tty.c index cf73fc3fd0f9..4456ceb23bd2 100644 --- a/drivers/s390/char/sclp_tty.c +++ b/drivers/s390/char/sclp_tty.c @@ -37,9 +37,9 @@ /* Lock to guard over changes to global variables. */ static DEFINE_SPINLOCK(sclp_tty_lock); /* List of free pages that can be used for console output buffering. */ -static struct list_head sclp_tty_pages; +static LIST_HEAD(sclp_tty_pages); /* List of full struct sclp_buffer structures ready for output. */ -static struct list_head sclp_tty_outqueue; +static LIST_HEAD(sclp_tty_outqueue); /* Counter how many buffers are emitted. */ static int sclp_tty_buffer_count; /* Pointer to current console buffer. */ @@ -516,7 +516,6 @@ sclp_tty_init(void) return rc; } /* Allocate pages for output buffering */ - INIT_LIST_HEAD(&sclp_tty_pages); for (i = 0; i < MAX_KMEM_PAGES; i++) { page = (void *) get_zeroed_page(GFP_KERNEL | GFP_DMA); if (page == NULL) { @@ -525,7 +524,6 @@ sclp_tty_init(void) } list_add_tail((struct list_head *) page, &sclp_tty_pages); } - INIT_LIST_HEAD(&sclp_tty_outqueue); timer_setup(&sclp_tty_timer, sclp_tty_timeout, 0); sclp_ttybuf = NULL; sclp_tty_buffer_count = 0; diff --git a/drivers/s390/char/sclp_vt220.c b/drivers/s390/char/sclp_vt220.c index 3a6e0af436f4..7f4445b0f819 100644 --- a/drivers/s390/char/sclp_vt220.c +++ b/drivers/s390/char/sclp_vt220.c @@ -64,10 +64,10 @@ static struct tty_port sclp_vt220_port; static DEFINE_SPINLOCK(sclp_vt220_lock); /* List of empty pages to be used as write request buffers */ -static struct list_head sclp_vt220_empty; +static LIST_HEAD(sclp_vt220_empty); /* List of pending requests */ -static struct list_head sclp_vt220_outqueue; +static LIST_HEAD(sclp_vt220_outqueue); /* Suspend mode flag */ static int sclp_vt220_suspended; @@ -693,8 +693,6 @@ static int __init __sclp_vt220_init(int num_pages) sclp_vt220_init_count++; if (sclp_vt220_init_count != 1) return 0; - INIT_LIST_HEAD(&sclp_vt220_empty); - INIT_LIST_HEAD(&sclp_vt220_outqueue); timer_setup(&sclp_vt220_timer, sclp_vt220_timeout, 0); tty_port_init(&sclp_vt220_port); sclp_vt220_current_request = NULL; |