[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 5 May 2020 15:00:37 -0400 (EDT)
From: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: ndesaulniers <ndesaulniers@...gle.com>,
Peter Zijlstra <peterz@...radead.org>,
Rasmus Villemoes <linux@...musvillemoes.dk>,
x86 <x86@...nel.org>,
linux-kernel <linux-kernel@...r.kernel.org>,
rostedt <rostedt@...dmis.org>,
Masami Hiramatsu <mhiramat@...nel.org>,
bristot <bristot@...hat.com>, jbaron <jbaron@...mai.com>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...nel.org>, Nadav Amit <namit@...are.com>,
"H. Peter Anvin" <hpa@...or.com>,
Andy Lutomirski <luto@...nel.org>,
Ard Biesheuvel <ard.biesheuvel@...aro.org>,
Josh Poimboeuf <jpoimboe@...hat.com>,
Paolo Bonzini <pbonzini@...hat.com>,
"H.J. Lu" <hjl.tools@...il.com>,
clang-built-linux <clang-built-linux@...glegroups.com>
Subject: Re: [PATCH v4 14/18] static_call: Add static_cond_call()
----- On May 5, 2020, at 2:48 PM, Linus Torvalds torvalds@...ux-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
Powered by blists - more mailing lists