All of lore.kernel.org
 help / color / mirror / Atom feed
* kernel/trace/ftrace.c:7157:20: error: unused function 'ftrace_startup_enable'
@ 2022-02-13 13:03 ` kernel test robot
  0 siblings, 0 replies; 12+ messages in thread
From: kernel test robot @ 2022-02-13 13:03 UTC (permalink / raw)
  To: chongjiapeng; +Cc: llvm, kbuild-all, linux-kernel, Steven Rostedt (VMware)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   b81b1829e7e39f6cebdf6e4d5484eacbceda8554
commit: 172f7ba9772cae12f099fc563352e905dc9a1921 ftrace: Make ftrace_profile_pages_init static
date:   4 months ago
config: arm-randconfig-r001-20220213 (https://download.01.org/0day-ci/archive/20220213/202202132037.4aN017dU-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 478c237e21b2c3a83e46f26fcbeb3876682f9b14)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install arm cross compiling tool for clang build
        # apt-get install binutils-arm-linux-gnueabi
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=172f7ba9772cae12f099fc563352e905dc9a1921
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 172f7ba9772cae12f099fc563352e905dc9a1921
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash drivers/gpu/drm/ kernel/trace/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

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.


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

0b6e4d56bf7186 Frederic Weisbecker      2008-10-28  7155  
8434dc9340cd2e Steven Rostedt (Red Hat  2015-01-20  7156) static inline int ftrace_init_dyn_tracefs(struct dentry *d_tracer) { return 0; }
df4fc31558dd2a Steven Rostedt           2008-11-26 @7157  static inline void ftrace_startup_enable(int command) { }
e1effa0144a1dd Steven Rostedt (Red Hat  2014-08-05  7158) static inline void ftrace_startup_all(int command) { }
8a56d7761d2d04 Steven Rostedt (Red Hat  2013-11-25  7159) 

:::::: The code at line 7157 was first introduced by commit
:::::: df4fc31558dd2a3a30292ddb3a64c2a5befcec73 ftrace: add function tracing to single thread

:::::: TO: Steven Rostedt <srostedt@redhat.com>
:::::: CC: Ingo Molnar <mingo@elte.hu>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

^ permalink raw reply	[flat|nested] 12+ messages in thread

* kernel/trace/ftrace.c:7157:20: error: unused function 'ftrace_startup_enable'
@ 2022-02-13 13:03 ` kernel test robot
  0 siblings, 0 replies; 12+ messages in thread
From: kernel test robot @ 2022-02-13 13:03 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 2633 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   b81b1829e7e39f6cebdf6e4d5484eacbceda8554
commit: 172f7ba9772cae12f099fc563352e905dc9a1921 ftrace: Make ftrace_profile_pages_init static
date:   4 months ago
config: arm-randconfig-r001-20220213 (https://download.01.org/0day-ci/archive/20220213/202202132037.4aN017dU-lkp(a)intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 478c237e21b2c3a83e46f26fcbeb3876682f9b14)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install arm cross compiling tool for clang build
        # apt-get install binutils-arm-linux-gnueabi
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=172f7ba9772cae12f099fc563352e905dc9a1921
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 172f7ba9772cae12f099fc563352e905dc9a1921
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash drivers/gpu/drm/ kernel/trace/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

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.


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

0b6e4d56bf7186 Frederic Weisbecker      2008-10-28  7155  
8434dc9340cd2e Steven Rostedt (Red Hat  2015-01-20  7156) static inline int ftrace_init_dyn_tracefs(struct dentry *d_tracer) { return 0; }
df4fc31558dd2a Steven Rostedt           2008-11-26 @7157  static inline void ftrace_startup_enable(int command) { }
e1effa0144a1dd Steven Rostedt (Red Hat  2014-08-05  7158) static inline void ftrace_startup_all(int command) { }
8a56d7761d2d04 Steven Rostedt (Red Hat  2013-11-25  7159) 

:::::: The code at line 7157 was first introduced by commit
:::::: df4fc31558dd2a3a30292ddb3a64c2a5befcec73 ftrace: add function tracing to single thread

:::::: TO: Steven Rostedt <srostedt@redhat.com>
:::::: CC: Ingo Molnar <mingo@elte.hu>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: kernel/trace/ftrace.c:7157:20: error: unused function 'ftrace_startup_enable'
  2022-02-13 13:03 ` kernel test robot
@ 2022-02-14 15:20   ` Steven Rostedt
  -1 siblings, 0 replies; 12+ messages in thread
From: Steven Rostedt @ 2022-02-14 15:20 UTC (permalink / raw)
  To: kernel test robot; +Cc: chongjiapeng, llvm, kbuild-all, linux-kernel

On Sun, 13 Feb 2022 21:03:29 +0800
kernel test robot <lkp@intel.com> 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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: kernel/trace/ftrace.c:7157:20: error: unused function 'ftrace_startup_enable'
@ 2022-02-14 15:20   ` Steven Rostedt
  0 siblings, 0 replies; 12+ messages in thread
From: Steven Rostedt @ 2022-02-14 15:20 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 757 bytes --]

On Sun, 13 Feb 2022 21:03:29 +0800
kernel test robot <lkp@intel.com> 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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: kernel/trace/ftrace.c:7157:20: error: unused function 'ftrace_startup_enable'
  2022-02-14 15:20   ` Steven Rostedt
@ 2022-02-14 15:53     ` Nathan Chancellor
  -1 siblings, 0 replies; 12+ messages in thread
From: Nathan Chancellor @ 2022-02-14 15:53 UTC (permalink / raw)
  To: Steven Rostedt
  Cc: kernel test robot, chongjiapeng, llvm, kbuild-all, linux-kernel

Hi Steve,

On Mon, Feb 14, 2022 at 10:20:00AM -0500, Steven Rostedt wrote:
> On Sun, 13 Feb 2022 21:03:29 +0800
> kernel test robot <lkp@intel.com> 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?

With -Wunused-function, clang will warn about unused static inline
functions within a .c file (but not .h), whereas GCC will not warn for
either. The unused attribute was added to the definition of inline to
make clang's behavior match GCC's.

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

However, in commit 6863f5643dd7 ("kbuild: allow Clang to find unused
static inline functions for W=1 build"), Masahiro made it so that the
unused attribute does not get added at W=1 so that instances of unused
static inline functions can be caught and eliminated (or put into use,
if the function should have been used), hence this report.

I will be honest, I don't know why the robot flagged 172f7ba9772c as the
commit that introduced this warning but it seems legitimate if
CONFIG_DYNAMIC_FTRACE is not enabled, since ftrace_startup_enable() is
only ever used within an '#ifdef CONFIG_DYNAMIC_FTRACE' block so I guess
the stub is unnecessary?

Cheers,
Nathan

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: kernel/trace/ftrace.c:7157:20: error: unused function 'ftrace_startup_enable'
@ 2022-02-14 15:53     ` Nathan Chancellor
  0 siblings, 0 replies; 12+ messages in thread
From: Nathan Chancellor @ 2022-02-14 15:53 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1709 bytes --]

Hi Steve,

On Mon, Feb 14, 2022 at 10:20:00AM -0500, Steven Rostedt wrote:
> On Sun, 13 Feb 2022 21:03:29 +0800
> kernel test robot <lkp@intel.com> 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?

With -Wunused-function, clang will warn about unused static inline
functions within a .c file (but not .h), whereas GCC will not warn for
either. The unused attribute was added to the definition of inline to
make clang's behavior match GCC's.

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

However, in commit 6863f5643dd7 ("kbuild: allow Clang to find unused
static inline functions for W=1 build"), Masahiro made it so that the
unused attribute does not get added at W=1 so that instances of unused
static inline functions can be caught and eliminated (or put into use,
if the function should have been used), hence this report.

I will be honest, I don't know why the robot flagged 172f7ba9772c as the
commit that introduced this warning but it seems legitimate if
CONFIG_DYNAMIC_FTRACE is not enabled, since ftrace_startup_enable() is
only ever used within an '#ifdef CONFIG_DYNAMIC_FTRACE' block so I guess
the stub is unnecessary?

Cheers,
Nathan

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: kernel/trace/ftrace.c:7157:20: error: unused function 'ftrace_startup_enable'
  2022-02-14 15:53     ` Nathan Chancellor
@ 2022-02-14 16:28       ` Masahiro Yamada
  -1 siblings, 0 replies; 12+ messages in thread
From: Masahiro Yamada @ 2022-02-14 16:28 UTC (permalink / raw)
  To: Nathan Chancellor
  Cc: Steven Rostedt, kernel test robot, chongjiapeng, llvm,
	kbuild-all, Linux Kernel Mailing List

On Tue, Feb 15, 2022 at 12:53 AM Nathan Chancellor <nathan@kernel.org> wrote:
>
> Hi Steve,
>
> On Mon, Feb 14, 2022 at 10:20:00AM -0500, Steven Rostedt wrote:
> > On Sun, 13 Feb 2022 21:03:29 +0800
> > kernel test robot <lkp@intel.com> 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?
>
> With -Wunused-function, clang will warn about unused static inline
> functions within a .c file (but not .h), whereas GCC will not warn for
> either. The unused attribute was added to the definition of inline to
> make clang's behavior match GCC's.
>
> > Is this a new warning caused by a commit, or is it a new warning because
> > the compiler now complains about it?
>
> However, in commit 6863f5643dd7 ("kbuild: allow Clang to find unused
> static inline functions for W=1 build"), Masahiro made it so that the
> unused attribute does not get added at W=1 so that instances of unused
> static inline functions can be caught and eliminated (or put into use,
> if the function should have been used), hence this report.

BTW, my hope was to move this warning to W=0 someday.
(that is, remove __inline_maybe_unused entirely).

I do not know how many warnings are still remaining, though.
Is it now more difficult due to CONFIG_WERROR?



> I will be honest, I don't know why the robot flagged 172f7ba9772c as the
> commit that introduced this warning but it seems legitimate if
> CONFIG_DYNAMIC_FTRACE is not enabled, since ftrace_startup_enable() is
> only ever used within an '#ifdef CONFIG_DYNAMIC_FTRACE' block so I guess
> the stub is unnecessary?
>
> Cheers,
> Nathan



-- 
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: kernel/trace/ftrace.c:7157:20: error: unused function 'ftrace_startup_enable'
@ 2022-02-14 16:28       ` Masahiro Yamada
  0 siblings, 0 replies; 12+ messages in thread
From: Masahiro Yamada @ 2022-02-14 16:28 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 2123 bytes --]

On Tue, Feb 15, 2022 at 12:53 AM Nathan Chancellor <nathan@kernel.org> wrote:
>
> Hi Steve,
>
> On Mon, Feb 14, 2022 at 10:20:00AM -0500, Steven Rostedt wrote:
> > On Sun, 13 Feb 2022 21:03:29 +0800
> > kernel test robot <lkp@intel.com> 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?
>
> With -Wunused-function, clang will warn about unused static inline
> functions within a .c file (but not .h), whereas GCC will not warn for
> either. The unused attribute was added to the definition of inline to
> make clang's behavior match GCC's.
>
> > Is this a new warning caused by a commit, or is it a new warning because
> > the compiler now complains about it?
>
> However, in commit 6863f5643dd7 ("kbuild: allow Clang to find unused
> static inline functions for W=1 build"), Masahiro made it so that the
> unused attribute does not get added at W=1 so that instances of unused
> static inline functions can be caught and eliminated (or put into use,
> if the function should have been used), hence this report.

BTW, my hope was to move this warning to W=0 someday.
(that is, remove __inline_maybe_unused entirely).

I do not know how many warnings are still remaining, though.
Is it now more difficult due to CONFIG_WERROR?



> I will be honest, I don't know why the robot flagged 172f7ba9772c as the
> commit that introduced this warning but it seems legitimate if
> CONFIG_DYNAMIC_FTRACE is not enabled, since ftrace_startup_enable() is
> only ever used within an '#ifdef CONFIG_DYNAMIC_FTRACE' block so I guess
> the stub is unnecessary?
>
> Cheers,
> Nathan



-- 
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: kernel/trace/ftrace.c:7157:20: error: unused function 'ftrace_startup_enable'
  2022-02-14 16:28       ` Masahiro Yamada
@ 2022-02-14 17:00         ` Nathan Chancellor
  -1 siblings, 0 replies; 12+ messages in thread
From: Nathan Chancellor @ 2022-02-14 17:00 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: Steven Rostedt, kernel test robot, chongjiapeng, llvm,
	kbuild-all, Linux Kernel Mailing List

On Tue, Feb 15, 2022 at 01:28:53AM +0900, Masahiro Yamada wrote:
> On Tue, Feb 15, 2022 at 12:53 AM Nathan Chancellor <nathan@kernel.org> wrote:
> >
> > Hi Steve,
> >
> > On Mon, Feb 14, 2022 at 10:20:00AM -0500, Steven Rostedt wrote:
> > > On Sun, 13 Feb 2022 21:03:29 +0800
> > > kernel test robot <lkp@intel.com> 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?
> >
> > With -Wunused-function, clang will warn about unused static inline
> > functions within a .c file (but not .h), whereas GCC will not warn for
> > either. The unused attribute was added to the definition of inline to
> > make clang's behavior match GCC's.
> >
> > > Is this a new warning caused by a commit, or is it a new warning because
> > > the compiler now complains about it?
> >
> > However, in commit 6863f5643dd7 ("kbuild: allow Clang to find unused
> > static inline functions for W=1 build"), Masahiro made it so that the
> > unused attribute does not get added at W=1 so that instances of unused
> > static inline functions can be caught and eliminated (or put into use,
> > if the function should have been used), hence this report.
> 
> BTW, my hope was to move this warning to W=0 someday.
> (that is, remove __inline_maybe_unused entirely).
> 
> I do not know how many warnings are still remaining, though.
> Is it now more difficult due to CONFIG_WERROR?

I have not done an audit in quite a while and I do not remember the
results of the last one. I don't think -Werror makes it more difficult,
it is more so just finding the time to sit down and work on it :) I
agree that it would be nice to make this the default behavior for
cleaner code, perhaps we can use this as a "good first issue" for
working with clang.

Cheers,
Nathan

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: kernel/trace/ftrace.c:7157:20: error: unused function 'ftrace_startup_enable'
@ 2022-02-14 17:00         ` Nathan Chancellor
  0 siblings, 0 replies; 12+ messages in thread
From: Nathan Chancellor @ 2022-02-14 17:00 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 2260 bytes --]

On Tue, Feb 15, 2022 at 01:28:53AM +0900, Masahiro Yamada wrote:
> On Tue, Feb 15, 2022 at 12:53 AM Nathan Chancellor <nathan@kernel.org> wrote:
> >
> > Hi Steve,
> >
> > On Mon, Feb 14, 2022 at 10:20:00AM -0500, Steven Rostedt wrote:
> > > On Sun, 13 Feb 2022 21:03:29 +0800
> > > kernel test robot <lkp@intel.com> 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?
> >
> > With -Wunused-function, clang will warn about unused static inline
> > functions within a .c file (but not .h), whereas GCC will not warn for
> > either. The unused attribute was added to the definition of inline to
> > make clang's behavior match GCC's.
> >
> > > Is this a new warning caused by a commit, or is it a new warning because
> > > the compiler now complains about it?
> >
> > However, in commit 6863f5643dd7 ("kbuild: allow Clang to find unused
> > static inline functions for W=1 build"), Masahiro made it so that the
> > unused attribute does not get added at W=1 so that instances of unused
> > static inline functions can be caught and eliminated (or put into use,
> > if the function should have been used), hence this report.
> 
> BTW, my hope was to move this warning to W=0 someday.
> (that is, remove __inline_maybe_unused entirely).
> 
> I do not know how many warnings are still remaining, though.
> Is it now more difficult due to CONFIG_WERROR?

I have not done an audit in quite a while and I do not remember the
results of the last one. I don't think -Werror makes it more difficult,
it is more so just finding the time to sit down and work on it :) I
agree that it would be nice to make this the default behavior for
cleaner code, perhaps we can use this as a "good first issue" for
working with clang.

Cheers,
Nathan

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: kernel/trace/ftrace.c:7157:20: error: unused function 'ftrace_startup_enable'
  2022-02-14 15:53     ` Nathan Chancellor
@ 2022-02-14 18:57       ` Steven Rostedt
  -1 siblings, 0 replies; 12+ messages in thread
From: Steven Rostedt @ 2022-02-14 18:57 UTC (permalink / raw)
  To: Nathan Chancellor
  Cc: kernel test robot, chongjiapeng, llvm, kbuild-all, linux-kernel

On Mon, 14 Feb 2022 08:53:04 -0700
Nathan Chancellor <nathan@kernel.org> wrote:

> I will be honest, I don't know why the robot flagged 172f7ba9772c as the
> commit that introduced this warning but it seems legitimate if
> CONFIG_DYNAMIC_FTRACE is not enabled, since ftrace_startup_enable() is
> only ever used within an '#ifdef CONFIG_DYNAMIC_FTRACE' block so I guess
> the stub is unnecessary?

I'm all fine for clean up patches, but I don't like "new warning" message
reports for things that use to be OK, but now are a warning.

In other words, if a bot updates its warnings, it should do a full pass of
the kernel before it starts on new commits, to flag all existing warnings
as OK (but possibly work for someone to clean up), but should not ever send
as a new warning message to the authors.

So, I'm going to ignore this. If someone wants to send me a clean up patch,
I'll test it and take it, but I do not have the time to clean up new
warnings that use to be OK unless they uncovered a real bug.

-- Steve

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: kernel/trace/ftrace.c:7157:20: error: unused function 'ftrace_startup_enable'
@ 2022-02-14 18:57       ` Steven Rostedt
  0 siblings, 0 replies; 12+ messages in thread
From: Steven Rostedt @ 2022-02-14 18:57 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1036 bytes --]

On Mon, 14 Feb 2022 08:53:04 -0700
Nathan Chancellor <nathan@kernel.org> wrote:

> I will be honest, I don't know why the robot flagged 172f7ba9772c as the
> commit that introduced this warning but it seems legitimate if
> CONFIG_DYNAMIC_FTRACE is not enabled, since ftrace_startup_enable() is
> only ever used within an '#ifdef CONFIG_DYNAMIC_FTRACE' block so I guess
> the stub is unnecessary?

I'm all fine for clean up patches, but I don't like "new warning" message
reports for things that use to be OK, but now are a warning.

In other words, if a bot updates its warnings, it should do a full pass of
the kernel before it starts on new commits, to flag all existing warnings
as OK (but possibly work for someone to clean up), but should not ever send
as a new warning message to the authors.

So, I'm going to ignore this. If someone wants to send me a clean up patch,
I'll test it and take it, but I do not have the time to clean up new
warnings that use to be OK unless they uncovered a real bug.

-- Steve

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2022-02-14 18:57 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-13 13:03 kernel/trace/ftrace.c:7157:20: error: unused function 'ftrace_startup_enable' kernel test robot
2022-02-13 13:03 ` kernel test robot
2022-02-14 15:20 ` Steven Rostedt
2022-02-14 15:20   ` Steven Rostedt
2022-02-14 15:53   ` Nathan Chancellor
2022-02-14 15:53     ` Nathan Chancellor
2022-02-14 16:28     ` Masahiro Yamada
2022-02-14 16:28       ` Masahiro Yamada
2022-02-14 17:00       ` Nathan Chancellor
2022-02-14 17:00         ` Nathan Chancellor
2022-02-14 18:57     ` Steven Rostedt
2022-02-14 18:57       ` Steven Rostedt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.