lkml.org 
[lkml]   [2018]   [Apr]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] trace: initcall: Ordered comparison of function pointers
Date
Using initcall_t in the __field macro generates the follwing 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.

Signed-off-by: Rishabh Bhatnagar <rishabhb@codeaurora.org>
---
include/trace/events/initcall.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/trace/events/initcall.h b/include/trace/events/initcall.h
index 8d6cf10..46f5f7c 100644
--- a/include/trace/events/initcall.h
+++ b/include/trace/events/initcall.h
@@ -31,7 +31,7 @@
TP_ARGS(func),

TP_STRUCT__entry(
- __field(initcall_t, func)
+ __field_struct(initcall_t, func)
),

TP_fast_assign(
@@ -48,7 +48,7 @@
TP_ARGS(func, ret),

TP_STRUCT__entry(
- __field(initcall_t, func)
+ __field_struct(initcall_t, func)
__field(int, ret)
),

--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
\
 
 \ /
  Last update: 2018-04-26 01:43    [W:0.024 / U:0.336 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site