tracing: initcall: Ordered comparison of function pointers
authorRishabh Bhatnagar <[email protected]>
Wed, 25 Apr 2018 23:42:35 +0000 (16:42 -0700)
committerSteven Rostedt (VMware) <[email protected]>
Thu, 26 Apr 2018 19:02:46 +0000 (15:02 -0400)
commit0566e40ce7c493d39006cdd7edf17bfdc52eb2ac
tree959a3d2e000f22accb7e81b81e81702fbd7232d8
parent61f94203c9efcaf44a7435298697caf406476c79
tracing: initcall: Ordered comparison of function pointers

Using initcall_t in the __field macro generates the following warning
with clang version 6.0:

include/trace/events/initcall.h:34:3: warning: ordered comparison of
function pointers ('initcall_t' (aka 'int (*)(void)') and 'initcall_t')

__field macro expands to __field_ext macro which does is_signed_type
check on the type argument. Since initcall_t is defined as a function
pointer, using it as the type in the __field macro, leads to an ordered
comparison of function pointer warning, inside the check. Using
__field_struct macro avoids the issue.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Rishabh Bhatnagar <[email protected]>
[ Added comment to why we are using field_struct() ]
Signed-off-by: Steven Rostedt (VMware) <[email protected]>
include/trace/events/initcall.h