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

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 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 2/2] target: remove spin_lock_assert() in __target_(attach|detach)_tg_pt_gp()

2018-03-23 Thread bige...@linutronix.de
On 2018-03-23 17:44:46 [+], Bart Van Assche wrote: > On Fri, 2018-03-23 at 18:19 +0100, bige...@linutronix.de wrote: > > __target_attach_tg_pt_gp() and __target_detach_tg_pt_gp() check if the > > caller > > holds lun_tg_pt_gp_lock(). Both functions are static, the call

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

2018-03-23 Thread bige...@linutronix.de
ion that is exported to random users, |and we should check that the calling convention is right. | |This looks like "it may have been useful during coding to document |things, but it's not useful long-term". Remove those checks. Signed-off-by: Sebastian Andrzej Siewior <bige.

[PATCH 2/2] target: remove spin_lock_assert() in __target_(attach|detach)_tg_pt_gp()

2018-03-23 Thread bige...@linutronix.de
__target_attach_tg_pt_gp() and __target_detach_tg_pt_gp() check if the caller holds lun_tg_pt_gp_lock(). Both functions are static, the callers are acquiring the lock before the invocation of the function so the check looks superfluous. Remove it. Signed-off-by: Sebastian Andrzej Siewior <b

Re: [PATCH] target: Use WARNON_NON_RT(!irqs_disabled())

2018-03-23 Thread bige...@linutronix.de
On 2018-03-23 16:25:25 [+], Bart Van Assche wrote: > On Fri, 2018-03-23 at 16:55 +0100, Sebastian Andrzej Siewior wrote: > > I am going take this into -RT tree for now until we have different > > solution. > > Have you considered to delete the WARN_ON_ONCE(!irqs_disabled()) statement? > I