Re: kernel/trace/ftrace.c:7157:20: error: unused function 'ftrace_startup_enable'

From: Steven Rostedt
Date: Mon Feb 14 2022 - 10:20:09 EST


On Sun, 13 Feb 2022 21:03:29 +0800
kernel test robot <lkp@xxxxxxxxx> wrote:

> All errors (new ones prefixed by >>):
>
> >> kernel/trace/ftrace.c:7157:20: error: unused function 'ftrace_startup_enable' [-Werror,-Wunused-function]
> static inline void ftrace_startup_enable(int command) { }
> ^
> 1 error generated.

Strange. I always thought that static inline functions do not cause
warnings when not used? Especially, since they are often in headers when
things are turned off. Or is it because this is in a C file?

Is this a new warning caused by a commit, or is it a new warning because
the compiler now complains about it?

-- Steve


>
>
> vim +/ftrace_startup_enable +7157 kernel/trace/ftrace.c