* [jimc:dd-stack 16/19] include/trace/events/printk.h:67:10: error: incompatible pointer types passing 'const struct _ddebug *' to parameter of type 'const struct _ddebug *'
@ 2021-12-03 4:34 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-12-03 4:34 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 20074 bytes --]
tree: https://github.com/jimc/linux.git dd-stack
head: 5259aebf5f0de40eea572cdbe02b22c82f996c92
commit: f616d2051a608d06d76c4dc86710d08fe15e05a9 [16/19] printk.h - split trace-event to declar-class+define-event
config: arm64-randconfig-r025-20211203 (https://download.01.org/0day-ci/archive/20211203/202112031207.VVOILVE8-lkp(a)intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 1e328b06c15273edf4a40a27ca24931b5efb3a87)
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 arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# https://github.com/jimc/linux/commit/f616d2051a608d06d76c4dc86710d08fe15e05a9
git remote add jimc https://github.com/jimc/linux.git
git fetch --no-tags jimc dd-stack
git checkout f616d2051a608d06d76c4dc86710d08fe15e05a9
# 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=arm64 SHELL=/bin/bash kernel/printk/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All error/warnings (new ones prefixed by >>):
In file included from kernel/printk/printk.c:56:
>> include/trace/events/printk.h:66:24: warning: declaration of 'struct _ddebug' will not be visible outside of this function [-Wvisibility]
TP_PROTO(const struct _ddebug *desc, const char *text, size_t len),
^
>> include/trace/events/printk.h:66:24: warning: declaration of 'struct _ddebug' will not be visible outside of this function [-Wvisibility]
>> include/trace/events/printk.h:67:10: error: incompatible pointer types passing 'const struct _ddebug *' to parameter of type 'const struct _ddebug *' [-Werror,-Wincompatible-pointer-types]
TP_ARGS(desc, text, len)
^~~~
include/linux/tracepoint.h:148:26: note: expanded from macro 'TP_ARGS'
#define TP_ARGS(args...) args
^~~~
include/linux/tracepoint.h:542:44: note: expanded from macro 'DEFINE_EVENT'
DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
^~~~
include/linux/tracepoint.h:107:25: note: expanded from macro 'PARAMS'
#define PARAMS(args...) args
^~~~
note: (skipping 4 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/tracepoint.h:206:33: note: expanded from macro '__DO_TRACE'
__DO_TRACE_CALL(name, TP_ARGS(args)); \
^~~~
include/linux/tracepoint.h:148:26: note: expanded from macro 'TP_ARGS'
#define TP_ARGS(args...) args
^~~~
include/linux/tracepoint.h:177:62: note: expanded from macro '__DO_TRACE_CALL'
#define __DO_TRACE_CALL(name, args) __traceiter_##name(NULL, args)
^~~~
include/trace/events/printk.h:66:33: note: passing argument to parameter 'desc' here
TP_PROTO(const struct _ddebug *desc, const char *text, size_t len),
^
>> include/trace/events/printk.h:66:24: warning: declaration of 'struct _ddebug' will not be visible outside of this function [-Wvisibility]
TP_PROTO(const struct _ddebug *desc, const char *text, size_t len),
^
>> include/trace/events/printk.h:67:10: error: incompatible pointer types passing 'const struct _ddebug *' to parameter of type 'const struct _ddebug *' [-Werror,-Wincompatible-pointer-types]
TP_ARGS(desc, text, len)
^~~~
include/linux/tracepoint.h:148:26: note: expanded from macro 'TP_ARGS'
#define TP_ARGS(args...) args
^~~~
include/linux/tracepoint.h:542:44: note: expanded from macro 'DEFINE_EVENT'
DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
^~~~
include/linux/tracepoint.h:107:25: note: expanded from macro 'PARAMS'
#define PARAMS(args...) args
^~~~
note: (skipping 6 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/tracepoint.h:206:33: note: expanded from macro '__DO_TRACE'
__DO_TRACE_CALL(name, TP_ARGS(args)); \
^~~~
include/linux/tracepoint.h:148:26: note: expanded from macro 'TP_ARGS'
#define TP_ARGS(args...) args
^~~~
include/linux/tracepoint.h:177:62: note: expanded from macro '__DO_TRACE_CALL'
#define __DO_TRACE_CALL(name, args) __traceiter_##name(NULL, args)
^~~~
include/trace/events/printk.h:66:33: note: passing argument to parameter 'desc' here
TP_PROTO(const struct _ddebug *desc, const char *text, size_t len),
^
>> include/trace/events/printk.h:66:24: warning: declaration of 'struct _ddebug' will not be visible outside of this function [-Wvisibility]
TP_PROTO(const struct _ddebug *desc, const char *text, size_t len),
^
>> include/trace/events/printk.h:66:24: warning: declaration of 'struct _ddebug' will not be visible outside of this function [-Wvisibility]
>> include/trace/events/printk.h:66:24: warning: declaration of 'struct _ddebug' will not be visible outside of this function [-Wvisibility]
>> include/trace/events/printk.h:66:24: warning: declaration of 'struct _ddebug' will not be visible outside of this function [-Wvisibility]
In file included from kernel/printk/printk.c:56:
In file included from include/trace/events/printk.h:73:
In file included from include/trace/define_trace.h:95:
>> include/trace/events/printk.h:66:24: warning: declaration of 'struct _ddebug' will not be visible outside of this function [-Wvisibility]
TP_PROTO(const struct _ddebug *desc, const char *text, size_t len),
^
>> include/trace/events/printk.h:65:1: error: conflicting types for '__traceiter_pr_debug'
DEFINE_EVENT(dyndbg, pr_debug,
^
include/trace/define_trace.h:57:2: note: expanded from macro 'DEFINE_EVENT'
DEFINE_TRACE(name, PARAMS(proto), PARAMS(args))
^
include/linux/tracepoint.h:328:2: note: expanded from macro 'DEFINE_TRACE'
DEFINE_TRACE_FN(name, NULL, NULL, PARAMS(proto), PARAMS(args));
^
include/linux/tracepoint.h:297:6: note: expanded from macro 'DEFINE_TRACE_FN'
int __traceiter_##_name(void *__data, proto); \
^
<scratch space>:123:1: note: expanded from here
__traceiter_pr_debug
^
include/trace/events/printk.h:65:1: note: previous declaration is here
DEFINE_EVENT(dyndbg, pr_debug,
^
include/linux/tracepoint.h:542:2: note: expanded from macro 'DEFINE_EVENT'
DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
^
include/linux/tracepoint.h:419:2: note: expanded from macro 'DECLARE_TRACE'
__DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \
^
include/linux/tracepoint.h:242:13: note: expanded from macro '__DECLARE_TRACE'
extern int __traceiter_##name(data_proto); \
^
<scratch space>:60:1: note: expanded from here
__traceiter_pr_debug
^
In file included from kernel/printk/printk.c:56:
In file included from include/trace/events/printk.h:73:
In file included from include/trace/define_trace.h:95:
>> include/trace/events/printk.h:66:24: warning: declaration of 'struct _ddebug' will not be visible outside of this function [-Wvisibility]
TP_PROTO(const struct _ddebug *desc, const char *text, size_t len),
^
>> include/trace/events/printk.h:65:1: error: conflicting types for '__traceiter_pr_debug'
DEFINE_EVENT(dyndbg, pr_debug,
^
include/trace/define_trace.h:57:2: note: expanded from macro 'DEFINE_EVENT'
DEFINE_TRACE(name, PARAMS(proto), PARAMS(args))
^
include/linux/tracepoint.h:328:2: note: expanded from macro 'DEFINE_TRACE'
DEFINE_TRACE_FN(name, NULL, NULL, PARAMS(proto), PARAMS(args));
^
include/linux/tracepoint.h:309:6: note: expanded from macro 'DEFINE_TRACE_FN'
int __traceiter_##_name(void *__data, proto) \
^
<scratch space>:131:1: note: expanded from here
__traceiter_pr_debug
^
include/trace/events/printk.h:65:1: note: previous declaration is here
DEFINE_EVENT(dyndbg, pr_debug,
^
include/linux/tracepoint.h:542:2: note: expanded from macro 'DEFINE_EVENT'
DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
^
include/linux/tracepoint.h:419:2: note: expanded from macro 'DECLARE_TRACE'
__DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \
^
include/linux/tracepoint.h:242:13: note: expanded from macro '__DECLARE_TRACE'
extern int __traceiter_##name(data_proto); \
^
<scratch space>:60:1: note: expanded from here
__traceiter_pr_debug
^
In file included from kernel/printk/printk.c:56:
In file included from include/trace/events/printk.h:73:
In file included from include/trace/define_trace.h:102:
In file included from include/trace/trace_events.h:559:
include/trace/events/printk.h:41:24: warning: declaration of 'struct _ddebug' will not be visible outside of this function [-Wvisibility]
TP_PROTO(const struct _ddebug *desc, const char *text, size_t len),
^
In file included from kernel/printk/printk.c:56:
In file included from include/trace/events/printk.h:73:
In file included from include/trace/define_trace.h:102:
In file included from include/trace/trace_events.h:760:
include/trace/events/printk.h:41:24: warning: declaration of 'struct _ddebug' will not be visible outside of this function [-Wvisibility]
TP_PROTO(const struct _ddebug *desc, const char *text, size_t len),
^
include/trace/events/printk.h:43:10: error: incompatible pointer types passing 'const struct _ddebug *' to parameter of type 'const struct _ddebug *' [-Werror,-Wincompatible-pointer-types]
TP_ARGS(desc, text, len),
^~~~
include/linux/tracepoint.h:148:26: note: expanded from macro 'TP_ARGS'
#define TP_ARGS(args...) args
^~~~
include/trace/trace_events.h:733:64: note: expanded from macro 'DECLARE_EVENT_CLASS'
__data_size = trace_event_get_offsets_##call(&__data_offsets, args); \
^~~~
include/trace/events/printk.h:41:33: note: passing argument to parameter 'desc' here
TP_PROTO(const struct _ddebug *desc, const char *text, size_t len),
^
In file included from kernel/printk/printk.c:56:
In file included from include/trace/events/printk.h:73:
In file included from include/trace/define_trace.h:102:
In file included from include/trace/trace_events.h:760:
>> include/trace/events/printk.h:65:1: error: incompatible function pointer types passing 'void (void *, const struct _ddebug *, const char *, size_t)' (aka 'void (void *, const struct _ddebug *, const char *, unsigned long)') to parameter of type 'void (*)(void *, const struct _ddebug *, const char *, size_t)' (aka 'void (*)(void *, const struct _ddebug *, const char *, unsigned long)') [-Werror,-Wincompatible-function-pointer-types]
DEFINE_EVENT(dyndbg, pr_debug,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/trace/trace_events.h:757:35: note: expanded from macro 'DEFINE_EVENT'
check_trace_callback_type_##call(trace_event_raw_event_##template); \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<scratch space>:60:1: note: expanded from here
trace_event_raw_event_dyndbg
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/trace/events/printk.h:65:1: note: passing argument to parameter 'cb' here
DEFINE_EVENT(dyndbg, pr_debug,
^
include/linux/tracepoint.h:542:2: note: expanded from macro 'DEFINE_EVENT'
DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
^
include/linux/tracepoint.h:419:2: note: expanded from macro 'DECLARE_TRACE'
__DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \
^
include/linux/tracepoint.h:279:42: note: expanded from macro '__DECLARE_TRACE'
check_trace_callback_type_##name(void (*cb)(data_proto)) \
^
In file included from kernel/printk/printk.c:56:
In file included from include/trace/events/printk.h:73:
In file included from include/trace/define_trace.h:102:
In file included from include/trace/trace_events.h:835:
include/trace/events/printk.h:41:24: warning: declaration of 'struct _ddebug' will not be visible outside of this function [-Wvisibility]
TP_PROTO(const struct _ddebug *desc, const char *text, size_t len),
^
In file included from kernel/printk/printk.c:56:
In file included from include/trace/events/printk.h:73:
In file included from include/trace/define_trace.h:103:
In file included from include/trace/perf.h:90:
include/trace/events/printk.h:41:24: warning: declaration of 'struct _ddebug' will not be visible outside of this function [-Wvisibility]
TP_PROTO(const struct _ddebug *desc, const char *text, size_t len),
^
>> include/trace/events/printk.h:40:1: error: conflicting types for 'perf_trace_dyndbg'
DECLARE_EVENT_CLASS(dyndbg,
^
include/trace/perf.h:32:27: note: expanded from macro 'DECLARE_EVENT_CLASS'
static notrace void \
^
<scratch space>:110:1: note: expanded from here
perf_trace_dyndbg
^
include/trace/events/printk.h:40:1: note: previous declaration is here
DECLARE_EVENT_CLASS(dyndbg,
^
include/trace/trace_events.h:790:72: note: expanded from macro 'DECLARE_EVENT_CLASS'
#define DECLARE_EVENT_CLASS(call, proto, args, tstruct, assign, print) \
^
include/trace/trace_events.h:656:2: note: expanded from macro '\
_TRACE_PERF_PROTO'
perf_trace_##call(void *__data, proto);
^
<scratch space>:80:1: note: expanded from here
perf_trace_dyndbg
^
In file included from kernel/printk/printk.c:56:
In file included from include/trace/events/printk.h:73:
In file included from include/trace/define_trace.h:103:
In file included from include/trace/perf.h:90:
include/trace/events/printk.h:43:10: error: incompatible pointer types passing 'const struct _ddebug *' to parameter of type 'const struct _ddebug *' [-Werror,-Wincompatible-pointer-types]
TP_ARGS(desc, text, len),
^~~~
include/linux/tracepoint.h:148:26: note: expanded from macro 'TP_ARGS'
#define TP_ARGS(args...) args
^~~~
include/trace/perf.h:46:64: note: expanded from macro 'DECLARE_EVENT_CLASS'
__data_size = trace_event_get_offsets_##call(&__data_offsets, args); \
^~~~
include/trace/events/printk.h:41:33: note: passing argument to parameter 'desc' here
TP_PROTO(const struct _ddebug *desc, const char *text, size_t len),
^
In file included from kernel/printk/printk.c:56:
In file included from include/trace/events/printk.h:73:
In file included from include/trace/define_trace.h:103:
In file included from include/trace/perf.h:90:
>> include/trace/events/printk.h:65:1: error: incompatible function pointer types passing 'void (void *, const struct _ddebug *, const char *, size_t)' (aka 'void (void *, const struct _ddebug *, const char *, unsigned long)') to parameter of type 'void (*)(void *, const struct _ddebug *, const char *, size_t)' (aka 'void (*)(void *, const struct _ddebug *, const char *, unsigned long)') [-Werror,-Wincompatible-function-pointer-types]
DEFINE_EVENT(dyndbg, pr_debug,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/trace/perf.h:82:35: note: expanded from macro 'DEFINE_EVENT'
check_trace_callback_type_##call(perf_trace_##template); \
^~~~~~~~~~~~~~~~~~~~~
<scratch space>:116:1: note: expanded from here
perf_trace_dyndbg
^~~~~~~~~~~~~~~~~
include/trace/events/printk.h:65:1: note: passing argument to parameter 'cb' here
DEFINE_EVENT(dyndbg, pr_debug,
^
include/linux/tracepoint.h:542:2: note: expanded from macro 'DEFINE_EVENT'
DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
^
include/linux/tracepoint.h:419:2: note: expanded from macro 'DECLARE_TRACE'
__DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \
^
include/linux/tracepoint.h:279:42: note: expanded from macro '__DECLARE_TRACE'
check_trace_callback_type_##name(void (*cb)(data_proto)) \
^
kernel/printk/printk.c:175:5: warning: no previous prototype for function 'devkmsg_sysctl_set_loglvl' [-Wmissing-prototypes]
int devkmsg_sysctl_set_loglvl(struct ctl_table *table, int write,
^
kernel/printk/printk.c:175:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int devkmsg_sysctl_set_loglvl(struct ctl_table *table, int write,
^
static
14 warnings and 9 errors generated.
vim +67 include/trace/events/printk.h
34
35 DEFINE_EVENT(printk, console,
36 TP_PROTO(const char *text, size_t len),
37 TP_ARGS(text, len)
38 );
39 #if 1
> 40 DECLARE_EVENT_CLASS(dyndbg,
> 41 TP_PROTO(const struct _ddebug *desc, const char *text, size_t len),
42
43 TP_ARGS(desc, text, len),
44
45 TP_STRUCT__entry(
46 __dynamic_array(char, msg, len + 1)
47 ),
48
49 TP_fast_assign(
50 /*
51 * Each trace entry is printed in a new line.
52 * If the msg finishes with '\n', cut it off
53 * to avoid blank lines in the trace.
54 */
55 if ((len > 0) && (text[len-1] == '\n'))
56 len -= 1;
57
58 memcpy(__get_str(msg), text, len);
59 __get_str(msg)[len] = 0;
60 ),
61
62 TP_printk("%s", __get_str(msg))
63 );
64
> 65 DEFINE_EVENT(dyndbg, pr_debug,
> 66 TP_PROTO(const struct _ddebug *desc, const char *text, size_t len),
> 67 TP_ARGS(desc, text, len)
68 );
69 #endif // if 0/1
70 #endif /* _TRACE_PRINTK_H */
71
72 /* This part must be outside protection */
> 73 #include <trace/define_trace.h>
---
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] only message in thread
only message in thread, other threads:[~2021-12-03 4:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-03 4:34 [jimc:dd-stack 16/19] include/trace/events/printk.h:67:10: error: incompatible pointer types passing 'const struct _ddebug *' to parameter of type 'const struct _ddebug *' kernel test robot
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.