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

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>

authored by

Vineeth Vijayan and committed by
Heiko Carstens
8bc00c04 7dd8ed09

+8 -16
+2 -4
drivers/s390/char/sclp.c
··· 37 37 static sccb_mask_t sclp_send_mask; 38 38 39 39 /* List of registered event listeners and senders. */ 40 - static struct list_head sclp_reg_list; 40 + static LIST_HEAD(sclp_reg_list); 41 41 42 42 /* List of queued requests. */ 43 - static struct list_head sclp_req_queue; 43 + static LIST_HEAD(sclp_req_queue); 44 44 45 45 /* Data for read and and init requests. */ 46 46 static struct sclp_req sclp_read_req; ··· 1178 1178 sclp_init_sccb = (void *) __get_free_page(GFP_ATOMIC | GFP_DMA); 1179 1179 BUG_ON(!sclp_read_sccb || !sclp_init_sccb); 1180 1180 /* Set up variables */ 1181 - INIT_LIST_HEAD(&sclp_req_queue); 1182 - INIT_LIST_HEAD(&sclp_reg_list); 1183 1181 list_add(&sclp_state_change_event.list, &sclp_reg_list); 1184 1182 timer_setup(&sclp_request_timer, NULL, 0); 1185 1183 timer_setup(&sclp_queue_timer, sclp_req_queue_timeout, 0);
+2 -4
drivers/s390/char/sclp_con.c
··· 28 28 /* Lock to guard over changes to global variables */ 29 29 static DEFINE_SPINLOCK(sclp_con_lock); 30 30 /* List of free pages that can be used for console output buffering */ 31 - static struct list_head sclp_con_pages; 31 + static LIST_HEAD(sclp_con_pages); 32 32 /* List of full struct sclp_buffer structures ready for output */ 33 - static struct list_head sclp_con_outqueue; 33 + static LIST_HEAD(sclp_con_outqueue); 34 34 /* Pointer to current console buffer */ 35 35 static struct sclp_buffer *sclp_conbuf; 36 36 /* Timer for delayed output of console messages */ ··· 323 323 if (rc) 324 324 return rc; 325 325 /* Allocate pages for output buffering */ 326 - INIT_LIST_HEAD(&sclp_con_pages); 327 326 for (i = 0; i < sclp_console_pages; i++) { 328 327 page = (void *) get_zeroed_page(GFP_KERNEL | GFP_DMA); 329 328 list_add_tail(page, &sclp_con_pages); 330 329 } 331 - INIT_LIST_HEAD(&sclp_con_outqueue); 332 330 sclp_conbuf = NULL; 333 331 timer_setup(&sclp_con_timer, sclp_console_timeout, 0); 334 332
+2 -4
drivers/s390/char/sclp_tty.c
··· 37 37 /* Lock to guard over changes to global variables. */ 38 38 static DEFINE_SPINLOCK(sclp_tty_lock); 39 39 /* List of free pages that can be used for console output buffering. */ 40 - static struct list_head sclp_tty_pages; 40 + static LIST_HEAD(sclp_tty_pages); 41 41 /* List of full struct sclp_buffer structures ready for output. */ 42 - static struct list_head sclp_tty_outqueue; 42 + static LIST_HEAD(sclp_tty_outqueue); 43 43 /* Counter how many buffers are emitted. */ 44 44 static int sclp_tty_buffer_count; 45 45 /* Pointer to current console buffer. */ ··· 516 516 return rc; 517 517 } 518 518 /* Allocate pages for output buffering */ 519 - INIT_LIST_HEAD(&sclp_tty_pages); 520 519 for (i = 0; i < MAX_KMEM_PAGES; i++) { 521 520 page = (void *) get_zeroed_page(GFP_KERNEL | GFP_DMA); 522 521 if (page == NULL) { ··· 524 525 } 525 526 list_add_tail((struct list_head *) page, &sclp_tty_pages); 526 527 } 527 - INIT_LIST_HEAD(&sclp_tty_outqueue); 528 528 timer_setup(&sclp_tty_timer, sclp_tty_timeout, 0); 529 529 sclp_ttybuf = NULL; 530 530 sclp_tty_buffer_count = 0;
+2 -4
drivers/s390/char/sclp_vt220.c
··· 64 64 static DEFINE_SPINLOCK(sclp_vt220_lock); 65 65 66 66 /* List of empty pages to be used as write request buffers */ 67 - static struct list_head sclp_vt220_empty; 67 + static LIST_HEAD(sclp_vt220_empty); 68 68 69 69 /* List of pending requests */ 70 - static struct list_head sclp_vt220_outqueue; 70 + static LIST_HEAD(sclp_vt220_outqueue); 71 71 72 72 /* Suspend mode flag */ 73 73 static int sclp_vt220_suspended; ··· 693 693 sclp_vt220_init_count++; 694 694 if (sclp_vt220_init_count != 1) 695 695 return 0; 696 - INIT_LIST_HEAD(&sclp_vt220_empty); 697 - INIT_LIST_HEAD(&sclp_vt220_outqueue); 698 696 timer_setup(&sclp_vt220_timer, sclp_vt220_timeout, 0); 699 697 tty_port_init(&sclp_vt220_port); 700 698 sclp_vt220_current_request = NULL;