lkml.org 
[lkml]   [2014]   [Feb]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH 37/46] kernel: Include appropriate header file in tracepoint.c
----- Original Message -----
> From: "Rashika Kheria" <rashika.kheria@gmail.com>
> To: linux-kernel@vger.kernel.org
> Cc: "Rashika Kheria" <rashika.kheria@gmail.com>, "Mathieu Desnoyers" <mathieu.desnoyers@efficios.com>, "Sasha Levin"
> <sasha.levin@oracle.com>, "Andrew Morton" <akpm@linux-foundation.org>, "Paul E. McKenney"
> <paulmck@linux.vnet.ibm.com>, "Sahara" <keun-o.park@windriver.com>, josh@joshtriplett.org
> Sent: Thursday, February 27, 2014 7:22:05 AM
> Subject: [PATCH 37/46] kernel: Include appropriate header file in tracepoint.c
>
> Include appropriate header file include/trace/events/syscalls.h in
> kernel/tracepoint.c because it has prototype definition of functions
> defined in kernel/tracepoint.c.
>
> This eliminates the following warning in kernel/tracepoint.c:
> kernel/tracepoint.c:738:6: warning: no previous prototype for
> ‘syscall_regfunc’ [-Wmissing-prototypes]
> kernel/tracepoint.c:755:6: warning: no previous prototype for
> ‘syscall_unregfunc’ [-Wmissing-prototypes]

Tracepoints are the infrastructure on which trace events are build. tracepoint.c
should not include a trace event header: this is an abstraction inversion.

I propose we move the

extern void syscall_regfunc(void);
extern void syscall_unregfunc(void);

declarations to include/linux/tracepoint.h instead.

Thanks,

Mathieu

>
> Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
> Reviewed-by: Josh Triplett <josh@joshtriplett.org>
> ---
> kernel/tracepoint.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/kernel/tracepoint.c b/kernel/tracepoint.c
> index 0e26255..124d733 100644
> --- a/kernel/tracepoint.c
> +++ b/kernel/tracepoint.c
> @@ -26,6 +26,7 @@
> #include <linux/slab.h>
> #include <linux/sched.h>
> #include <linux/static_key.h>
> +#include <trace/events/syscalls.h>
>
> extern struct tracepoint * const __start___tracepoints_ptrs[];
> extern struct tracepoint * const __stop___tracepoints_ptrs[];
> --
> 1.7.9.5
>
>

--
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2014-02-28 16:01    [W:0.412 / U:25.416 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site