diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2013-09-06 19:16:14 +0200 |
---|---|---|
committer | Heiko Carstens <heiko.carstens@de.ibm.com> | 2013-09-07 11:58:07 +0200 |
commit | 5eb8ae503e13c6eee3545e3e3be986db000ae8c2 (patch) | |
tree | 3afd3870cd35c5ffdf54481732cc6253a189f2a7 /arch | |
parent | 63df41d663fc27e96571bfea86d3f9ee81289e07 (diff) |
s390/ftrace: avoid pointer arithmetics with function pointers
Pointer arithmetics with function pointers is not really defined, but
seems to do the right thing. Let's cast to a void pointer to have a
defined behaviour, at least when using gcc.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/s390/kernel/ftrace.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/s390/kernel/ftrace.c b/arch/s390/kernel/ftrace.c index 4c807206812..1014ad5f769 100644 --- a/arch/s390/kernel/ftrace.c +++ b/arch/s390/kernel/ftrace.c @@ -178,7 +178,7 @@ int ftrace_enable_ftrace_graph_caller(void) offset = ((void *) prepare_ftrace_return - (void *) ftrace_graph_caller) / 2; - return probe_kernel_write(ftrace_graph_caller + 2, + return probe_kernel_write((void *) ftrace_graph_caller + 2, &offset, sizeof(offset)); } @@ -186,7 +186,7 @@ int ftrace_disable_ftrace_graph_caller(void) { static unsigned short offset = 0x0002; - return probe_kernel_write(ftrace_graph_caller + 2, + return probe_kernel_write((void *) ftrace_graph_caller + 2, &offset, sizeof(offset)); } |