Re: [PATCH 1/3] notifier: Fix broken error handling pattern

2019-06-25 Thread Peter Zijlstra
On Tue, Jun 25, 2019 at 07:13:34AM -0500, Josh Poimboeuf wrote: > On Tue, Jun 25, 2019 at 09:38:21AM +0200, Peter Zijlstra wrote: > > > > @@ -156,43 +169,30 @@ int atomic_notifier_chain_unregister(str > > > > } > > > > EXPORT_SYMBOL_GPL(atomic_notifier_chain_unregister); > > > > > > > > -/** >

Re: [PATCH 1/3] notifier: Fix broken error handling pattern

2019-06-25 Thread Josh Poimboeuf
On Tue, Jun 25, 2019 at 09:38:21AM +0200, Peter Zijlstra wrote: > > > @@ -156,43 +169,30 @@ int atomic_notifier_chain_unregister(str > > > } > > > EXPORT_SYMBOL_GPL(atomic_notifier_chain_unregister); > > > > > > -/** > > > - * __atomic_notifier_call_chain - Call functions in an atomic >

Re: [PATCH 1/3] notifier: Fix broken error handling pattern

2019-06-25 Thread Peter Zijlstra
On Mon, Jun 24, 2019 at 05:21:07PM -0500, Josh Poimboeuf wrote: > On Mon, Jun 24, 2019 at 11:18:44AM +0200, Peter Zijlstra wrote: > > The current notifiers have the following error handling pattern all > > over the place: > > > > int nr; > > > > ret = __foo_notifier_call_chain(, val_up,

Re: [PATCH 1/3] notifier: Fix broken error handling pattern

2019-06-24 Thread Josh Poimboeuf
On Mon, Jun 24, 2019 at 11:18:44AM +0200, Peter Zijlstra wrote: > The current notifiers have the following error handling pattern all > over the place: > > int nr; > > ret = __foo_notifier_call_chain(, val_up, v, -1, ); > if (err & NOTIFIER_STOP_MASK) s/err/ret/ >

[PATCH 1/3] notifier: Fix broken error handling pattern

2019-06-24 Thread Peter Zijlstra
The current notifiers have the following error handling pattern all over the place: int nr; ret = __foo_notifier_call_chain(, val_up, v, -1, ); if (err & NOTIFIER_STOP_MASK) __foo_notifier_call_chain(, val_down, v, nr-1, NULL) And aside from the endless