* [PATCH v2] kernel/locking: mutex: simplify access to the first entry in the wait-list
@ 2013-12-12 11:29 Andrzej Pietrasiewicz
2013-12-12 11:35 ` Peter Zijlstra
0 siblings, 1 reply; 10+ messages in thread
From: Andrzej Pietrasiewicz @ 2013-12-12 11:29 UTC (permalink / raw)
To: linux-kernel
Cc: Andrzej Pietrasiewicz, Kyungmin Park, Marek Szyprowski,
Peter Zijlstra, Ingo Molnar
Use list_first_entry instead of explicitly accessing the first entry
with "head".next. The comment one line above becomes obsolete.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
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(-)
diff --git a/kernel/locking/mutex.c b/kernel/locking/mutex.c
index 4dd6e4c..4af4f9c 100644
--- a/kernel/locking/mutex.c
+++ b/kernel/locking/mutex.c
@@ -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);
--
1.7.0.4
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH v2] kernel/locking: mutex: simplify access to the first entry in the wait-list
2013-12-12 11:29 [PATCH v2] kernel/locking: mutex: simplify access to the first entry in the wait-list Andrzej Pietrasiewicz
@ 2013-12-12 11:35 ` Peter Zijlstra
2013-12-12 12:02 ` Kyungmin Park
0 siblings, 1 reply; 10+ messages in thread
From: Peter Zijlstra @ 2013-12-12 11:35 UTC (permalink / raw)
To: Andrzej Pietrasiewicz
Cc: linux-kernel, Kyungmin Park, Marek Szyprowski, Ingo Molnar
On Thu, Dec 12, 2013 at 12:29:32PM +0100, Andrzej Pietrasiewicz wrote:
> Use list_first_entry instead of explicitly accessing the first entry
> with "head".next. The comment one line above becomes obsolete.
>
> Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> ---
>
> 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.
^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: [PATCH v2] kernel/locking: mutex: simplify access to the first entry in the wait-list
2013-12-12 11:35 ` Peter Zijlstra
@ 2013-12-12 12:02 ` Kyungmin Park
2013-12-12 12:47 ` Ingo Molnar
2013-12-12 12:52 ` Peter Zijlstra
0 siblings, 2 replies; 10+ messages in thread
From: Kyungmin Park @ 2013-12-12 12:02 UTC (permalink / raw)
To: 'Peter Zijlstra', 'Andrzej Pietrasiewicz'
Cc: linux-kernel, 'Marek Szyprowski', 'Ingo Molnar'
> -----Original Message-----
> From: Peter Zijlstra [mailto:peterz@infradead.org]
> Sent: Thursday, December 12, 2013 8:35 PM
> To: Andrzej Pietrasiewicz
> Cc: linux-kernel@vger.kernel.org; Kyungmin Park; Marek Szyprowski; Ingo
> Molnar
> Subject: Re: [PATCH v2] kernel/locking: mutex: simplify access to the
> first entry in the wait-list
>
> On Thu, Dec 12, 2013 at 12:29:32PM +0100, Andrzej Pietrasiewicz wrote:
> > Use list_first_entry instead of explicitly accessing the first entry
> > with "head".next. The comment one line above becomes obsolete.
> >
> > Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
> > Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> > ---
> >
> > 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.
Internal review process, and it represents this patch comes from.
Thank you,
Kyungmin Park
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2] kernel/locking: mutex: simplify access to the first entry in the wait-list
2013-12-12 12:02 ` Kyungmin Park
@ 2013-12-12 12:47 ` Ingo Molnar
2013-12-12 12:52 ` Peter Zijlstra
1 sibling, 0 replies; 10+ messages in thread
From: Ingo Molnar @ 2013-12-12 12:47 UTC (permalink / raw)
To: Kyungmin Park
Cc: 'Peter Zijlstra', 'Andrzej Pietrasiewicz',
linux-kernel, 'Marek Szyprowski', 'Ingo Molnar'
* Kyungmin Park <kyungmin.park@samsung.com> wrote:
>
> > -----Original Message-----
> > From: Peter Zijlstra [mailto:peterz@infradead.org]
> > Sent: Thursday, December 12, 2013 8:35 PM
> > To: Andrzej Pietrasiewicz
> > Cc: linux-kernel@vger.kernel.org; Kyungmin Park; Marek Szyprowski; Ingo
> > Molnar
> > Subject: Re: [PATCH v2] kernel/locking: mutex: simplify access to the
> > first entry in the wait-list
> >
> > On Thu, Dec 12, 2013 at 12:29:32PM +0100, Andrzej Pietrasiewicz wrote:
> > > Use list_first_entry instead of explicitly accessing the first entry
> > > with "head".next. The comment one line above becomes obsolete.
> > >
> > > Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
> > > Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> > > ---
> > >
> > > 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.
>
> Internal review process, and it represents this patch comes from.
That can be expressed via a Reviewed-by line.
Thanks,
Ingo
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2] kernel/locking: mutex: simplify access to the first entry in the wait-list
2013-12-12 12:02 ` Kyungmin Park
2013-12-12 12:47 ` Ingo Molnar
@ 2013-12-12 12:52 ` Peter Zijlstra
2013-12-13 6:24 ` Andrzej Pietrasiewicz
1 sibling, 1 reply; 10+ messages in thread
From: Peter Zijlstra @ 2013-12-12 12:52 UTC (permalink / raw)
To: Kyungmin Park
Cc: 'Andrzej Pietrasiewicz', linux-kernel,
'Marek Szyprowski', 'Ingo Molnar'
On Thu, Dec 12, 2013 at 09:02:07PM +0900, Kyungmin Park wrote:
>
> > -----Original Message-----
> > From: Peter Zijlstra [mailto:peterz@infradead.org]
> > Sent: Thursday, December 12, 2013 8:35 PM
> > To: Andrzej Pietrasiewicz
> > Cc: linux-kernel@vger.kernel.org; Kyungmin Park; Marek Szyprowski; Ingo
> > Molnar
> > Subject: Re: [PATCH v2] kernel/locking: mutex: simplify access to the
> > first entry in the wait-list
> >
> > On Thu, Dec 12, 2013 at 12:29:32PM +0100, Andrzej Pietrasiewicz wrote:
> > > Use list_first_entry instead of explicitly accessing the first entry
> > > with "head".next. The comment one line above becomes obsolete.
> > >
> > > Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
> > > Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> > > ---
> > >
> > > 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.
>
> Internal review process, and it represents this patch comes from.
For review we have this specific tag, oddly called: 'Reviewed-by'.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2] kernel/locking: mutex: simplify access to the first entry in the wait-list
2013-12-12 12:52 ` Peter Zijlstra
@ 2013-12-13 6:24 ` Andrzej Pietrasiewicz
2013-12-13 14:00 ` Peter Zijlstra
2013-12-13 14:04 ` Ingo Molnar
0 siblings, 2 replies; 10+ messages in thread
From: Andrzej Pietrasiewicz @ 2013-12-13 6:24 UTC (permalink / raw)
To: Peter Zijlstra
Cc: Kyungmin Park, linux-kernel, 'Marek Szyprowski',
'Ingo Molnar', Greg Kroah-Hartman
Hello Ingo & Peter,
I added Greg on Cc.
W dniu 12.12.2013 13:52, Peter Zijlstra pisze:
> On Thu, Dec 12, 2013 at 09:02:07PM +0900, Kyungmin Park wrote:
>>
>>> -----Original Message-----
>>> From: Peter Zijlstra [mailto:peterz@infradead.org]
>>> Sent: Thursday, December 12, 2013 8:35 PM
>>> To: Andrzej Pietrasiewicz
>>> Cc: linux-kernel@vger.kernel.org; Kyungmin Park; Marek Szyprowski; Ingo
>>> Molnar
>>> Subject: Re: [PATCH v2] kernel/locking: mutex: simplify access to the
>>> first entry in the wait-list
>>>
>>> On Thu, Dec 12, 2013 at 12:29:32PM +0100, Andrzej Pietrasiewicz wrote:
>>>> Use list_first_entry instead of explicitly accessing the first entry
>>>> with "head".next. The comment one line above becomes obsolete.
>>>>
>>>> Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
>>>> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
>>>> ---
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
>>>>
>>>> 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.
>>
>> Internal review process, and it represents this patch comes from.
>
> For review we have this specific tag, oddly called: 'Reviewed-by'.
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2] kernel/locking: mutex: simplify access to the first entry in the wait-list
2013-12-13 6:24 ` Andrzej Pietrasiewicz
@ 2013-12-13 14:00 ` Peter Zijlstra
2013-12-13 14:08 ` Ingo Molnar
2013-12-14 17:26 ` Greg Kroah-Hartman
2013-12-13 14:04 ` Ingo Molnar
1 sibling, 2 replies; 10+ messages in thread
From: Peter Zijlstra @ 2013-12-13 14:00 UTC (permalink / raw)
To: Andrzej Pietrasiewicz
Cc: Kyungmin Park, linux-kernel, 'Marek Szyprowski',
'Ingo Molnar', Greg Kroah-Hartman
On Fri, Dec 13, 2013 at 07:24:06AM +0100, Andrzej Pietrasiewicz wrote:
> 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.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2] kernel/locking: mutex: simplify access to the first entry in the wait-list
2013-12-13 6:24 ` Andrzej Pietrasiewicz
2013-12-13 14:00 ` Peter Zijlstra
@ 2013-12-13 14:04 ` Ingo Molnar
1 sibling, 0 replies; 10+ messages in thread
From: Ingo Molnar @ 2013-12-13 14:04 UTC (permalink / raw)
To: Andrzej Pietrasiewicz
Cc: Peter Zijlstra, Kyungmin Park, linux-kernel,
'Marek Szyprowski', 'Ingo Molnar',
Greg Kroah-Hartman
* Andrzej Pietrasiewicz <andrzej.p@samsung.com> wrote:
> Hello Ingo & Peter,
>
> I added Greg on Cc.
>
> W dniu 12.12.2013 13:52, Peter Zijlstra pisze:
> >On Thu, Dec 12, 2013 at 09:02:07PM +0900, Kyungmin Park wrote:
> >>
> >>>-----Original Message-----
> >>>From: Peter Zijlstra [mailto:peterz@infradead.org]
> >>>Sent: Thursday, December 12, 2013 8:35 PM
> >>>To: Andrzej Pietrasiewicz
> >>>Cc: linux-kernel@vger.kernel.org; Kyungmin Park; Marek Szyprowski; Ingo
> >>>Molnar
> >>>Subject: Re: [PATCH v2] kernel/locking: mutex: simplify access to the
> >>>first entry in the wait-list
> >>>
> >>>On Thu, Dec 12, 2013 at 12:29:32PM +0100, Andrzej Pietrasiewicz wrote:
> >>>>Use list_first_entry instead of explicitly accessing the first entry
> >>>>with "head".next. The comment one line above becomes obsolete.
> >>>>
> >>>>Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
> >>>>Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> >>>>---
>
> 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
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2] kernel/locking: mutex: simplify access to the first entry in the wait-list
2013-12-13 14:00 ` Peter Zijlstra
@ 2013-12-13 14:08 ` Ingo Molnar
2013-12-14 17:26 ` Greg Kroah-Hartman
1 sibling, 0 replies; 10+ messages in thread
From: Ingo Molnar @ 2013-12-13 14:08 UTC (permalink / raw)
To: Peter Zijlstra
Cc: Andrzej Pietrasiewicz, Kyungmin Park, linux-kernel,
'Marek Szyprowski', 'Ingo Molnar',
Greg Kroah-Hartman
* Peter Zijlstra <peterz@infradead.org> wrote:
> On Fri, Dec 13, 2013 at 07:24:06AM +0100, Andrzej Pietrasiewicz wrote:
> > 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
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2] kernel/locking: mutex: simplify access to the first entry in the wait-list
2013-12-13 14:00 ` Peter Zijlstra
2013-12-13 14:08 ` Ingo Molnar
@ 2013-12-14 17:26 ` Greg Kroah-Hartman
1 sibling, 0 replies; 10+ messages in thread
From: Greg Kroah-Hartman @ 2013-12-14 17:26 UTC (permalink / raw)
To: Peter Zijlstra
Cc: Andrzej Pietrasiewicz, Kyungmin Park, linux-kernel,
'Marek Szyprowski', 'Ingo Molnar'
On Fri, Dec 13, 2013 at 03:00:11PM +0100, Peter Zijlstra wrote:
> On Fri, Dec 13, 2013 at 07:24:06AM +0100, Andrzej Pietrasiewicz wrote:
> > 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
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2013-12-14 19:27 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-12 11:29 [PATCH v2] kernel/locking: mutex: simplify access to the first entry in the wait-list Andrzej Pietrasiewicz
2013-12-12 11:35 ` Peter Zijlstra
2013-12-12 12:02 ` Kyungmin Park
2013-12-12 12:47 ` Ingo Molnar
2013-12-12 12:52 ` Peter Zijlstra
2013-12-13 6:24 ` Andrzej Pietrasiewicz
2013-12-13 14:00 ` Peter Zijlstra
2013-12-13 14:08 ` Ingo Molnar
2013-12-14 17:26 ` Greg Kroah-Hartman
2013-12-13 14:04 ` Ingo Molnar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox