Skip to contentSkip to conversation

kernel/trace/trace_events.c:158:5: warning: no previous prototype for 'trace_define_field_ext'

PATCH kernel test robot 3 participants 4 messages Feb 12, 2023 – Feb 13, 2023

lore
Share & tools
lore

kernel test robot

author build bot
#0 lore raw
tree:   git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace trace/urgent
head:   b6c7abd1c28a63ad633433d037ee15a1bc3023ba
commit: b6c7abd1c28a63ad633433d037ee15a1bc3023ba [13/13] tracing: Fix TASK_COMM_LEN in trace event format file
config: sh-allmodconfig (https://download.01.org/0day-ci/archive/20230213/[email protected]/config)
compiler: sh4-linux-gcc (GCC) 12.1.0

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
# https://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git/commit/?id=b6c7abd1c28a63ad633433d037ee15a1bc3023ba
git remote add trace git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace
git fetch --no-tags trace trace/urgent
git checkout b6c7abd1c28a63ad633433d037ee15a1bc3023ba
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=sh olddefconfig COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=sh SHELL=/bin/bash kernel/trace/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <[email protected]>
| Link: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All warnings (new ones prefixed by >>):

>> kernel/trace/trace_events.c:158:5: warning: no previous prototype for 'trace_define_field_ext' [-Wmissing-prototypes]

158 | int trace_define_field_ext(struct trace_event_call *call, const char *type,
| ^~~~~~~~~~~~~~~~~~~~~~

vim +/trace_define_field_ext +158 kernel/trace/trace_events.c

157

 > 158	int trace_define_field_ext(struct trace_event_call *call, const char *type,

159 const char *name, int offset, int size, int is_signed,
160 int filter_type, int len)
161 {
162 struct list_head *head;
163
164 if (WARN_ON(!call->class))
165 return 0;
166
167 head = trace_get_fields(call);
168 return __trace_define_field(head, type, name, offset, size,
169 is_signed, filter_type, len);
170 }
171

Signature · 2 lines
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
#1 lore raw
Quoted 22 lines · kernel test robot
tree:   git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace trace/urgent
head:   b6c7abd1c28a63ad633433d037ee15a1bc3023ba
commit: b6c7abd1c28a63ad633433d037ee15a1bc3023ba [13/13] tracing: Fix TASK_COMM_LEN in trace event format file
config: sh-allmodconfig (https://download.01.org/0day-ci/archive/20230213/[email protected]/config)
compiler: sh4-linux-gcc (GCC) 12.1.0

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
# https://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git/commit/?id=b6c7abd1c28a63ad633433d037ee15a1bc3023ba
git remote add trace git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace
git fetch --no-tags trace trace/urgent
git checkout b6c7abd1c28a63ad633433d037ee15a1bc3023ba
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=sh olddefconfig COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=sh SHELL=/bin/bash kernel/trace/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <[email protected]>
| Link: https://lore.kernel.org/oe-kbuild-all/[email protected]/

Quoted 6 lines

All warnings (new ones prefixed by >>):

Quoted 1 line
Quoted 1 line

kernel/trace/trace_events.c:158:5: warning: no previous prototype for 'trace_define_field_ext' [-Wmissing-prototypes]

158 | int trace_define_field_ext(struct trace_event_call *call, const char *type,
| ^~~~~~~~~~~~~~~~~~~~~~

Thanks for the report.
Should make trace_define_field_ext static.
I will send a fix.

Quoted 22 lines

vim +/trace_define_field_ext +158 kernel/trace/trace_events.c

   157
Quoted 1 line

158 int trace_define_field_ext(struct trace_event_call *call, const char *type,

159 const char *name, int offset, int size, int is_signed,
160 int filter_type, int len)

   161  {
   162          struct list_head *head;
   163
   164          if (WARN_ON(!call->class))
   165                  return 0;
   166
   167          head = trace_get_fields(call);
   168          return __trace_define_field(head, type, name, offset, size,
   169                                      is_signed, filter_type, len);
   170  }
   171

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests

Signature · 2 lines
Regards
Yafang
#2 lore raw
Quoted 25 lines · Yafang Shao
Quoted 24 lines · kernel test robot
tree:   git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace trace/urgent
head:   b6c7abd1c28a63ad633433d037ee15a1bc3023ba
commit: b6c7abd1c28a63ad633433d037ee15a1bc3023ba [13/13] tracing: Fix TASK_COMM_LEN in trace event format file
config: sh-allmodconfig (https://download.01.org/0day-ci/archive/20230213/[email protected]/config)
compiler: sh4-linux-gcc (GCC) 12.1.0

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
# https://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git/commit/?id=b6c7abd1c28a63ad633433d037ee15a1bc3023ba
git remote add trace git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace
git fetch --no-tags trace trace/urgent
git checkout b6c7abd1c28a63ad633433d037ee15a1bc3023ba
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=sh olddefconfig COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=sh SHELL=/bin/bash kernel/trace/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <[email protected]>
| Link: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All warnings (new ones prefixed by >>):

Quoted 8 lines
Quoted 4 lines
Quoted 1 line
Quoted 1 line

kernel/trace/trace_events.c:158:5: warning: no previous prototype for 'trace_define_field_ext' [-Wmissing-prototypes]

158 | int trace_define_field_ext(struct trace_event_call *call, const char *type,
| ^~~~~~~~~~~~~~~~~~~~~~

Thanks for the report.
Should make trace_define_field_ext static.
I will send a fix.

No need, I already made one and it just passed my tests. I'll be sending a pull request shortly.

-- Steve

Quoted 26 lines
Quoted 23 lines

vim +/trace_define_field_ext +158 kernel/trace/trace_events.c

   157
Quoted 1 line

158 int trace_define_field_ext(struct trace_event_call *call, const char *type,

159 const char *name, int offset, int size, int is_signed,
160 int filter_type, int len)

   161  {
   162          struct list_head *head;
   163
   164          if (WARN_ON(!call->class))
   165                  return 0;
   166
   167          head = trace_get_fields(call);
   168          return __trace_define_field(head, type, name, offset, size,
   169                                      is_signed, filter_type, len);
   170  }
   171

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests

Signature · 1 line
Sent from my Android device with K-9 Mail. Please excuse my brevity and top posting.
#3 lore raw
Quoted 34 lines · Steven Rostedt
Quoted 30 lines · Yafang Shao
Quoted 28 lines · kernel test robot
tree:   git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace trace/urgent
head:   b6c7abd1c28a63ad633433d037ee15a1bc3023ba
commit: b6c7abd1c28a63ad633433d037ee15a1bc3023ba [13/13] tracing: Fix TASK_COMM_LEN in trace event format file
config: sh-allmodconfig (https://download.01.org/0day-ci/archive/20230213/[email protected]/config)
compiler: sh4-linux-gcc (GCC) 12.1.0

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
# https://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git/commit/?id=b6c7abd1c28a63ad633433d037ee15a1bc3023ba
git remote add trace git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace
git fetch --no-tags trace trace/urgent
git checkout b6c7abd1c28a63ad633433d037ee15a1bc3023ba
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=sh olddefconfig COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=sh SHELL=/bin/bash kernel/trace/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <[email protected]>
| Link: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All warnings (new ones prefixed by >>):

Quoted 1 line
Quoted 1 line

kernel/trace/trace_events.c:158:5: warning: no previous prototype for 'trace_define_field_ext' [-Wmissing-prototypes]

158 | int trace_define_field_ext(struct trace_event_call *call, const char *type,
| ^~~~~~~~~~~~~~~~~~~~~~

Quoted 5 lines
Quoted 3 lines

Thanks for the report.
Should make trace_define_field_ext static.
I will send a fix.

No need, I already made one and it just passed my tests. I'll be sending a pull request shortly.

Thanks for the work!

Signature · 2 lines
Regards
Yafang