Re: [PATCH 1/2] target: drop spin_lock_assert() + irqs_disabled() combo checks

2018-05-28 Thread bige...@linutronix.de
On 2018-03-28 08:31:38 [-0700], Bart Van Assche wrote: > On 03/28/18 08:14, bige...@linutronix.de wrote: > > On 2018-03-28 15:05:41 [+], Bart Van Assche wrote: > > > The names of the two functions touched by patch 1/2 start with a double > > > underscore. That by itself is already a hint that

Re: [PATCH 1/2] target: drop spin_lock_assert() + irqs_disabled() combo checks

2018-03-28 Thread Bart Van Assche
On 03/28/18 08:14, bige...@linutronix.de wrote: On 2018-03-28 15:05:41 [+], Bart Van Assche wrote: The names of the two functions touched by patch 1/2 start with a double underscore. That by itself is already a hint that these should be called with a lock held (I know that this is not a

Re: [PATCH 1/2] target: drop spin_lock_assert() + irqs_disabled() combo checks

2018-03-28 Thread bige...@linutronix.de
On 2018-03-28 15:05:41 [+], Bart Van Assche wrote: > The names of the two functions touched by patch 1/2 start with a double > underscore. That by itself is already a hint that these should be called with > a lock held (I know that this is not a universal convention in the Linux > kernel). I'm

Re: [PATCH 1/2] target: drop spin_lock_assert() + irqs_disabled() combo checks

2018-03-28 Thread Bart Van Assche
On Wed, 2018-03-28 at 12:15 +0200, bige...@linutronix.de wrote: > On 2018-03-26 11:13:59 [-0400], Steven Rostedt wrote: > > > diff --git a/drivers/target/target_core_tmr.c > > > b/drivers/target/target_core_tmr.c > > > index 9c7bc1ca341a..3d35dad1de2c 100644 > > > ---

Re: [PATCH 1/2] target: drop spin_lock_assert() + irqs_disabled() combo checks

2018-03-28 Thread bige...@linutronix.de
On 2018-03-26 11:13:59 [-0400], Steven Rostedt wrote: > > diff --git a/drivers/target/target_core_tmr.c > > b/drivers/target/target_core_tmr.c > > index 9c7bc1ca341a..3d35dad1de2c 100644 > > --- a/drivers/target/target_core_tmr.c > > +++ b/drivers/target/target_core_tmr.c > > Can you add a

Re: [PATCH 1/2] target: drop spin_lock_assert() + irqs_disabled() combo checks

2018-03-26 Thread Steven Rostedt
On Fri, 23 Mar 2018 18:17:36 +0100 "bige...@linutronix.de" wrote: > There are a few functions which check for if the lock is held > (spin_lock_assert()) and the interrupts are disabled (irqs_disabled()). > >From looking at the code, each function is static, the caller is

[PATCH 1/2] target: drop spin_lock_assert() + irqs_disabled() combo checks

2018-03-23 Thread bige...@linutronix.de
There are a few functions which check for if the lock is held (spin_lock_assert()) and the interrupts are disabled (irqs_disabled()). >From looking at the code, each function is static, the caller is near by and does spin_lock_irq|safe(). As Linus puts it: |It's not like this is some function