Messages in this thread | | | Date | Fri, 10 Mar 2023 16:09:52 -0500 | From | Steven Rostedt <> | Subject | Re: [RFC][PATCH 0/5] Improve static call NULL handling |
| |
On Fri, 10 Mar 2023 12:31:12 -0800 Josh Poimboeuf <jpoimboe@kernel.org> wrote:
> static_call_update(foo, STATIC_CALL_NOP); // do nothing and return 0 > static_call_update(foo, STATIC_CALL_BUG); // panic > static_call_update(foo, NULL); // ??? > > The default behavior for NULL could be a key-specific policy, stored as > a flag in the static_call_key struct.
Could we just get rid of the ambiguity and make
static_call_update(foo, NULL);
trigger a WARN_ON() instead, and always do nop?
The issue I have with allowing NULL, is that it's not easy to know from the call site what it does.
-- Steve
| |