Skip to content

Commit d0695e2

Browse files
changbindurostedt
authored andcommitted
tracing: xen: Ordered comparison of function pointers
Just as commit 0566e40 ("tracing: initcall: Ordered comparison of function pointers"), this patch fixes another remaining one in xen.h found by clang-9. In file included from arch/x86/xen/trace.c:21: In file included from ./include/trace/events/xen.h:475: In file included from ./include/trace/define_trace.h:102: In file included from ./include/trace/trace_events.h:473: ./include/trace/events/xen.h:69:7: warning: ordered comparison of function \ pointers ('xen_mc_callback_fn_t' (aka 'void (*)(void *)') and 'xen_mc_callback_fn_t') [-Wordered-compare-function-pointers] __field(xen_mc_callback_fn_t, fn) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ./include/trace/trace_events.h:421:29: note: expanded from macro '__field' ^ ./include/trace/trace_events.h:407:6: note: expanded from macro '__field_ext' is_signed_type(type), filter_type); \ ^ ./include/linux/trace_events.h:554:44: note: expanded from macro 'is_signed_type' ^ Fixes: c796f21 ("xen/trace: add multicall tracing") Signed-off-by: Changbin Du <[email protected]> Signed-off-by: Steven Rostedt (VMware) <[email protected]>
1 parent b3a987b commit d0695e2

File tree

1 file changed

+5
-1
lines changed
  • include/trace/events

1 file changed

+5
-1
lines changed

include/trace/events/xen.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,11 @@ TRACE_EVENT(xen_mc_callback,
6666
TP_PROTO(xen_mc_callback_fn_t fn, void *data),
6767
TP_ARGS(fn, data),
6868
TP_STRUCT__entry(
69-
__field(xen_mc_callback_fn_t, fn)
69+
/*
70+
* Use field_struct to avoid is_signed_type()
71+
* comparison of a function pointer.
72+
*/
73+
__field_struct(xen_mc_callback_fn_t, fn)
7074
__field(void *, data)
7175
),
7276
TP_fast_assign(

0 commit comments

Comments
 (0)