Re: [PATCH 2/3] module: Fix up module_notifier return values.
Peter Zijlstra <[email protected]> Tue, 25 Jun 2019 09:42:14 +0200
| Newsgroups | gmane.linux.network,gmane.linux.kernel,gmane.linux.oprofile |
|---|---|
| Message-ID | <[email protected]> |
On Mon, Jun 24, 2019 at 04:58:10PM -0400, Frank Ch. Eigler wrote: > Hi - > > > > While auditing all module notifiers I noticed a whole bunch of fail > > > wrt the return value. Notifiers have a 'special' return semantics. > > From peterz's comments, the patches, it's not obvious to me how one is > to choose between 0 (NOTIFY_DONE) and 1 (NOTIFY_OK) in the case of a > routine success. I'm not sure either; what I think I choice was: - if I want to completely ignore the callback, use DONE (per the "Don't care" comment). - if we finished the notifier without error, use OK or notifier_from_errno(0). But yes, its a bit of a shit interface.