kernel/locking: mutex: simplify access to the first entry in the wait-list
PATCH 1/1 kernel/locking: mutex: simplify access to the first entry in the wait-list
Use list_first_entry instead of explicitly accessing the first entry with "head".next. The comment one line above becomes obsolete.
--- kernel/locking/mutex.c | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-)
kernel/locking/mutex.c +2 -3
@@ -730,10 +730,9 @@ __mutex_unlock_common_slowpath(atomic_t *lock_count, int nested)atomic_set (&lock->count,1 );if (!list_empty (&lock->wait_list)) { -/* get the first entry from the wait-list: */ struct mutex_waiter *waiter = -list_entry (lock->wait_list.next, - struct mutex_waiter, list); +list_first_entry (&lock->wait_list, + struct mutex_waiter, list);debug_mutex_wake_waiter (lock, waiter);
Signature · 1 line
1.7.0.4
Peter Zijlstra
maintainerQuoted 5 lines · Andrzej Pietrasiewicz
Use
list_first_entryinstead of explicitly accessing the first entry with "head".next. The comment one line above becomes obsolete.Signed-off-by Andrzej Pietrasiewicz <[email protected]>Signed-off-by Kyungmin Park <[email protected]>
This is an invalid sign-off trail.
W dniu 12.12.2013 10:53, Peter Zijlstra pisze:
Quoted 9 lines · Andrzej Pietrasiewicz
Quoted 5 lines
Use
list_first_entryinstead of explicitly accessing the first entry with "head".next. The comment one line above becomes obsolete.Signed-off-by Andrzej Pietrasiewicz <[email protected]>Signed-off-by Kyungmin Park <[email protected]>This is an invalid sign-off trail.
Right... Thanks for spotting this. I will correct it and resubmit.
AP
Quoted 5 lines · Andrzej Pietrasiewicz
Use
list_first_entryinstead of explicitly accessing the first entry with "head".next. The comment one line above becomes obsolete.Signed-off-by Andrzej Pietrasiewicz <[email protected]>Signed-off-by Kyungmin Park <[email protected]>
that signoff sequence looks bogus - the first SOB should be the author, the last SOB the person sending the patch. If you want to credit someone please do it elsewhere in the changelog.
Thanks,
Ingo