]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
tracing: Fix warning on variable 'struct trace_array'
authorAashish Sharma <shraash@google.com>
Mon, 7 Nov 2022 16:05:56 +0000 (21:35 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 26 Nov 2022 08:27:53 +0000 (09:27 +0100)
commit2aaab8dcf024be0d80507cf5feaf85a7801d1746
tree4f38191707b7139d911f801f317b0a86fbf447f4
parentd372ea508f9a10819136e20158e50eda7b7aaf70
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>
include/linux/trace.h