Thread (3 messages) 3 messages, 3 authors, 2023-05-17

Re: [PATCH] tracing: make ftrace_likely_update() declaration visible

From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2023-05-17 16:40:06
Also in: lkml

On Wed, May 17, 2023 at 5:47 AM Arnd Bergmann [off-list ref] wrote:
From: Arnd Bergmann <arnd@arndb.de>

This function is only used when CONFIG_TRACE_BRANCH_PROFILING is
set, and the declaration is hidden behind this Kconfig symbol,
which causes a warning if disabled:
That explanation is not very clear.

The problem is that the tracing code itself is built with
DISABLE_BRANCH_PROFILING, in order to not recurse. And that hides the
declaration when the definition is compiled, leading to the problem.

CONFIG_TRACE_BRANCH_PROFILING isn't the problem in itself - *that*
part of the test is consistent (not used, not declared, and not
compiled if it is off).

The problem is that DISABLE_BRANCH_PROFILING case, where it is used
elsewhere, but not declared when it is itself compiled.

I applied the patch, but I tried to reword the explanation to be more
clear. I may have failed.

          Linus
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help