Re: [PATCH v0 00/42] notifiers: Return an error when callback is already registered

2021-11-08 Thread Borislav Petkov
On Mon, Nov 08, 2021 at 11:23:13AM -0500, Steven Rostedt wrote: > Question, how often does this warning trigger? Is it common to see in > development? Yeah, haven't seen it myself yet. But we hashed it out over IRC. :-) -- Regards/Gruss, Boris.

Re: [PATCH v0 00/42] notifiers: Return an error when callback is already registered

2021-11-08 Thread Steven Rostedt
On Mon, 8 Nov 2021 15:35:50 +0100 Borislav Petkov wrote: > On Mon, Nov 08, 2021 at 03:24:39PM +0100, Borislav Petkov wrote: > > I guess I can add another indirection to notifier_chain_register() and > > avoid touching all the call sites. > > IOW, something like this below. > > This way I

Re: [PATCH v0 00/42] notifiers: Return an error when callback is already registered

2021-11-08 Thread Borislav Petkov
On Mon, Nov 08, 2021 at 03:24:39PM +0100, Borislav Petkov wrote: > I guess I can add another indirection to notifier_chain_register() and > avoid touching all the call sites. IOW, something like this below. This way I won't have to touch all the callsites and the registration routines would

Re: [PATCH v0 00/42] notifiers: Return an error when callback is already registered

2021-11-08 Thread Borislav Petkov
On Mon, Nov 08, 2021 at 09:17:03AM -0500, Alan Stern wrote: > What reason is there for moving the check into the callers? It seems > like pointless churn. Why not add the error return code, change the > WARN to pr_warn, and leave the callers as they are? Wouldn't that end > up having exactly

Re: [PATCH v0 00/42] notifiers: Return an error when callback is already registered

2021-11-08 Thread Alan Stern
On Mon, Nov 08, 2021 at 11:19:24AM +0100, Borislav Petkov wrote: > From: Borislav Petkov > > Hi all, > > this is a huge patchset for something which is really trivial - it > changes the notifier registration routines to return an error value > if a notifier callback is already present on the

[PATCH v0 00/42] notifiers: Return an error when callback is already registered

2021-11-08 Thread Borislav Petkov
From: Borislav Petkov Hi all, this is a huge patchset for something which is really trivial - it changes the notifier registration routines to return an error value if a notifier callback is already present on the respective list of callbacks. For more details scroll to the last patch.