Skip to content

Commit

Permalink
wait: use LIST_HEAD_INIT() to initialize wait_queue_head
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Julian Wiedmann authored and Peter Zijlstra committed Jun 28, 2021
1 parent 459b09b commit 77eccd0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/linux/wait.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 77eccd0

Please sign in to comment.