Patch "tracing: Fix warning on variable 'struct trace_array'" has been added to the 6.0-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    tracing: Fix warning on variable 'struct trace_array'

to the 6.0-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     tracing-fix-warning-on-variable-struct-trace_array.patch
and it can be found in the queue-6.0 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit ac5cfa5b6327ef2b727476193747490e2856f224
Author: Aashish Sharma <shraash@xxxxxxxxxx>
Date:   Mon Nov 7 21:35:56 2022 +0530

    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@xxxxxxxxxx
    
    Fixes: 1a77dd1c2bb5 ("scsi: tracing: Fix compile error in trace_array calls when TRACING is disabled")
    Cc: "Martin K. Petersen" <martin.petersen@xxxxxxxxxx>
    Cc: Arun Easi <aeasi@xxxxxxxxxxx>
    Acked-by: Masami Hiramatsu (Google) <mhiramat@xxxxxxxxxx>
    Reviewed-by: Guenter Roeck <linux@xxxxxxxxxxxx>
    Signed-off-by: Aashish Sharma <shraash@xxxxxxxxxx>
    Signed-off-by: Steven Rostedt (Google) <rostedt@xxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

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,



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux