Messages in this thread | | | Date | Tue, 24 Mar 2020 17:54:54 +0100 | From | Peter Zijlstra <> | Subject | Re: [RESEND][PATCH v3 14/17] static_call: Add static_cond_call() |
| |
On Tue, Mar 24, 2020 at 09:14:03AM -0700, Linus Torvalds wrote: > On Tue, Mar 24, 2020 at 7:25 AM Peter Zijlstra <peterz@infradead.org> wrote: > > > > Extend the static_call infrastructure to optimize the following common > > pattern: > > > > if (func_ptr) > > func_ptr(args...) > > Is there any reason why this shouldn't be the default static call pattern? > > IOW, do we need the special "cond" versions at all? Couldn't we just > say that this is how static calls fundamentally work - if the function > is NULL, they are nops?
That doesn't work for functions that have a return value ...
| |