kernel/locking: mutex: simplify access to the first entry in the wait-list
PATCH v2 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.
---
v1..v2:
- corrected the email address in the second Signed-off-by line
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 10 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]>---
v1..v2:
- corrected the email address in the second Signed-off-by line
Still invalid; the problem is that you appear to have written the patch (you send it and you have first sob).
So what is Kyungmin doing in the line? He did not send me your patch.
Quoted 20 lines
-----Original Message-----
From: Peter Zijlstra [mailto:[email protected]]
Sent: Thursday, December 12, 2013 8:35 PM
To: Andrzej Pietrasiewicz
Cc: [email protected]; Kyungmin Park; Marek Szyprowski; Ingo Molnar
Subject: Re: [PATCH v2] kernel/locking: mutex: simplify access to the first entry in the wait-listQuoted 9 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]>---
v1..v2:
Quoted 7 lines
Quoted 1 line
- corrected the email address in the second Signed-off-by line
Still invalid; the problem is that you appear to have written the patch (you send it and you have first sob).
So what is Kyungmin doing in the line? He did not send me your patch.
Internal review process, and it represents this patch comes from.
Thank you,
Kyungmin Park
Quoted 22 lines · Kyungmin Park
Quoted 22 lines
-----Original Message-----
From: Peter Zijlstra [mailto:[email protected]]
Sent: Thursday, December 12, 2013 8:35 PM
To: Andrzej Pietrasiewicz
Cc: [email protected]; Kyungmin Park; Marek Szyprowski; Ingo Molnar
Subject: Re: [PATCH v2] kernel/locking: mutex: simplify access to the first entry in the wait-listQuoted 10 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]>---
v1..v2:
- corrected the email address in the second Signed-off-by line
Quoted 7 lines
Quoted 5 lines
Still invalid; the problem is that you appear to have written the patch (you send it and you have first sob).
So what is Kyungmin doing in the line? He did not send me your patch.
Internal review process, and it represents this patch comes from.
That can be expressed via a Reviewed-by line.
Thanks,
Ingo
Peter Zijlstra
maintainerQuoted 22 lines · Kyungmin Park
Quoted 22 lines
-----Original Message-----
From: Peter Zijlstra [mailto:[email protected]]
Sent: Thursday, December 12, 2013 8:35 PM
To: Andrzej Pietrasiewicz
Cc: [email protected]; Kyungmin Park; Marek Szyprowski; Ingo Molnar
Subject: Re: [PATCH v2] kernel/locking: mutex: simplify access to the first entry in the wait-listQuoted 10 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]>---
v1..v2:
- corrected the email address in the second Signed-off-by line
Quoted 7 lines
Quoted 5 lines
Still invalid; the problem is that you appear to have written the patch (you send it and you have first sob).
So what is Kyungmin doing in the line? He did not send me your patch.
Internal review process, and it represents this patch comes from.
For review we have this specific tag, oddly called: 'Reviewed-by'.
Hello Ingo & Peter,
I added Greg on Cc.
W dniu 12.12.2013 13:52, Peter Zijlstra pisze:
Quoted 11 lines · Kyungmin Park
Quoted 10 lines
Quoted 10 lines
-----Original Message-----
From: Peter Zijlstra [mailto:[email protected]]
Sent: Thursday, December 12, 2013 8:35 PM
To: Andrzej Pietrasiewicz
Cc: [email protected]; Kyungmin Park; Marek Szyprowski; Ingo Molnar
Subject: Re: [PATCH v2] kernel/locking: mutex: simplify access to the first entry in the wait-list
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines · Andrzej Pietrasiewicz
Quoted 6 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]>---
For quite a long time I've been sending the same SOB lines to the linux-usb list.
Can you please refer here:
http://www.spinics.net/lists/linux-usb/msg74981.html
Quoted 15 lines
Quoted 5 lines
Quoted 5 lines
Quoted 4 lines
v1..v2:
- corrected the email address in the second Signed-off-by line
Quoted 7 lines
Quoted 5 lines
Still invalid; the problem is that you appear to have written the patch (you send it and you have first sob).
So what is Kyungmin doing in the line? He did not send me your patch.
Internal review process, and it represents this patch comes from.
For review we have this specific tag, oddly called: 'Reviewed-by'.
Peter Zijlstra
maintainerQuoted 6 lines · Andrzej Pietrasiewicz
Hello Ingo & Peter,
I added Greg on Cc.
For quite a long time I've been sending the same SOB lines to the linux-usb list.
Then Greg is more forgiving. Doesn't make it right though.
Quoted 9 lines · Peter Zijlstra
Quoted 6 lines · Andrzej Pietrasiewicz
Hello Ingo & Peter,
I added Greg on Cc.
For quite a long time I've been sending the same SOB lines to the linux-usb list.
Then Greg is more forgiving. Doesn't make it right though.
Also, it's easy to not notice, and it has no testable side effects.
Yet if mistakes _are_ noticed like in this case then the inconsistency should be fixed, as the SOB chains have specific meaning.
Thanks,
Ingo
Quoted 9 lines · Peter Zijlstra
Quoted 6 lines · Andrzej Pietrasiewicz
Hello Ingo & Peter,
I added Greg on Cc.
For quite a long time I've been sending the same SOB lines to the linux-usb list.
Then Greg is more forgiving. Doesn't make it right though.
I usually make sure the one sending me the patch is the "last" on the chain, if not, that's a mistake on my part when I take the patch, sorry.
greg k-h
Quoted 20 lines · Andrzej Pietrasiewicz
Hello Ingo & Peter,
I added Greg on Cc.
W dniu 12.12.2013 13:52, Peter Zijlstra pisze:
Quoted 15 lines · Kyungmin Park
Quoted 14 lines
Quoted 14 lines
-----Original Message-----
From: Peter Zijlstra [mailto:[email protected]]
Sent: Thursday, December 12, 2013 8:35 PM
To: Andrzej Pietrasiewicz
Cc: [email protected]; Kyungmin Park; Marek Szyprowski; Ingo Molnar
Subject: Re: [PATCH v2] kernel/locking: mutex: simplify access to the first entry in the wait-listQuoted 3 lines · Andrzej Pietrasiewicz
Use
list_first_entryinstead of explicitly accessing the first entry with "head".next. The comment one line above becomes obsolete.
Quoted 6 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Signed-off-by Andrzej Pietrasiewicz <[email protected]>Signed-off-by Kyungmin Park <[email protected]>---
For quite a long time I've been sending the same SOB lines to the linux-usb list.
They can slip through the cracks - but in the past Linus has complained about such SOB sequences so it's a real concern.
SOB has a very specific purpose outlined in Documentation/SubmittingPatches, please use Reviewed-by or other methods of adding credit to others.
Of course if you write a patch and Kyungmin sends me the patch then that signoff sequence is completely valid.
Thanks,
Ingo