wait: use LIST_HEAD_INIT() to initialize wait_queue_head
authorJulian Wiedmann <jwi@linux.ibm.com>
Tue, 1 Jun 2021 15:11:20 +0000 (17:11 +0200)
committerPeter Zijlstra <peterz@infradead.org>
Mon, 28 Jun 2021 13:42:25 +0000 (15:42 +0200)
Replace the open-coded initialization with the right macro.

Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20210601151120.329223-1-jwi@linux.ibm.com
include/linux/wait.h

index fe10e8570a522166903411cfd9ab02f4109813fe..99c5f05718cdff6c71a8b518345e1e944dc79253 100644 (file)
@@ -56,7 +56,7 @@ struct task_struct;
 
 #define __WAIT_QUEUE_HEAD_INITIALIZER(name) {                                  \
        .lock           = __SPIN_LOCK_UNLOCKED(name.lock),                      \
-       .head           = { &(name).head, &(name).head } }
+       .head           = LIST_HEAD_INIT(name.head) }
 
 #define DECLARE_WAIT_QUEUE_HEAD(name) \
        struct wait_queue_head name = __WAIT_QUEUE_HEAD_INITIALIZER(name)