lkml.org 
[lkml]   [2009]   [Jan]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: ftrace breaks sparc64 build

On Tue, 6 Jan 2009, Heiko Carstens wrote:


Sam and Heiko,

I'm trying to see if the (a ? b : c) construct is causing the issue. Can
you test this patch.

Thanks,

-- Steve

diff --git a/include/linux/compiler.h b/include/linux/compiler.h
index d95da10..e13ad24 100644
--- a/include/linux/compiler.h
+++ b/include/linux/compiler.h
@@ -113,7 +113,8 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect);
* "Define 'is'", Bill Clinton
* "Define 'if'", Steven Rostedt
*/
-#define if(cond) if (__builtin_constant_p((cond)) ? !!(cond) : \
+#define if(cond) if ((__builtin_constant_p((cond)) && !!(cond)) || \
+ (!__builtin_constant_p((cond)) && \
({ \
int ______r; \
static struct ftrace_branch_data \
@@ -130,7 +131,7 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect);
else \
______f.miss++; \
______r; \
- }))
+ })))
#endif /* CONFIG_PROFILE_ALL_BRANCHES */

#else

\
 
 \ /
  Last update: 2009-01-06 05:33    [W:0.069 / U:1.204 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site