diff options
| author | Aashish Sharma <shraash@google.com> | 2022-11-07 21:35:56 +0530 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-11-26 09:24:49 +0100 |
| commit | 9b8c0c88f414ee5d47c43309a4b83397a028b193 (patch) | |
| tree | 3b77a777de4f3c39b3934f390075511900c56107 /include | |
| parent | 73cf0ff9a39369708c0d99d02ab378212d9c594d (diff) | |
| download | linux-9b8c0c88f414ee5d47c43309a4b83397a028b193.tar.gz linux-9b8c0c88f414ee5d47c43309a4b83397a028b193.tar.bz2 linux-9b8c0c88f414ee5d47c43309a4b83397a028b193.zip | |
tracing: Fix warning on variable 'struct trace_array'
[ Upstream commit bedf06833b1f63c2627bd5634602e05592129d7a ]
Move the declaration of 'struct trace_array' out of #ifdef
CONFIG_TRACING block, to fix the following warning when CONFIG_TRACING
is not set:
>> include/linux/trace.h:63:45: warning: 'struct trace_array' declared
inside parameter list will not be visible outside of this definition or
declaration
Link: https://lkml.kernel.org/r/20221107160556.2139463-1-shraash@google.com
Fixes: 1a77dd1c2bb5 ("scsi: tracing: Fix compile error in trace_array calls when TRACING is disabled")
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: Arun Easi <aeasi@marvell.com>
Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Aashish Sharma <shraash@google.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/trace.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/trace.h b/include/linux/trace.h index b5e16e438448..80ffda871749 100644 --- a/include/linux/trace.h +++ b/include/linux/trace.h @@ -26,13 +26,13 @@ struct trace_export { int flags; }; +struct trace_array; + #ifdef CONFIG_TRACING int register_ftrace_export(struct trace_export *export); int unregister_ftrace_export(struct trace_export *export); -struct trace_array; - void trace_printk_init_buffers(void); __printf(3, 4) int trace_array_printk(struct trace_array *tr, unsigned long ip, |
