Messages in this thread | | | Date | Tue, 5 May 2020 15:00:37 -0400 (EDT) | From | Mathieu Desnoyers <> | Subject | Re: [PATCH v4 14/18] static_call: Add static_cond_call() |
| |
----- On May 5, 2020, at 2:48 PM, Linus Torvalds torvalds@linux-foundation.org wrote: [...] > > Your initial reaction that "you can't compile away the read and the > test of NULL" was correct, I think.
I suspect this pattern of "if (func != NULL) func(...)" could be semantically changed to just invoking an empty function which effectively does nothing. This would remove the need to do a pointer check in the first place. But maybe I'm missing something subtle about why it has not been done in this context.
Thanks,
Mathieu
-- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com
| |