mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Masami Hiramatsu (Google) <mhiramat@kernel.org>
To: Aashish Sharma <shraash@google.com>
Cc: Steven Rostedt <rostedt@goodmis.org>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	Arun Easi <aeasi@marvell.com>,
	linux-kernel@vger.kernel.org,
	Linux Trace Kernel <linux-trace-kernel@vger.kernel.org>
Subject: Re: [PATCH] tracing: Fix warning on variable 'struct trace_array'
Date: Fri, 11 Nov 2022 21:48:49 +0900	[thread overview]
Message-ID: <20221111214849.895359f49037ec6cf21292a3@kernel.org> (raw)
In-Reply-To: <20221107160556.2139463-1-shraash@google.com>

On Mon,  7 Nov 2022 21:35:56 +0530
Aashish Sharma <shraash@google.com> wrote:

> 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
> 

This looks good to me.

Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>

Thank you!

> Fixes: 1a77dd1c2bb5 ("scsi: tracing: Fix compile error in trace_array calls when TRACING is disabled")
> Cc: Arun Easi <aeasi@marvell.com>
> Signed-off-by: Aashish Sharma <shraash@google.com>
> ---
>  include/linux/trace.h | 4 ++--
>  1 file 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,
> -- 
> 2.38.1.431.g37b22c650d-goog
> 


-- 
Masami Hiramatsu (Google) <mhiramat@kernel.org>

  parent reply	other threads:[~2022-11-11 12:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-07 16:05 Aashish Sharma
2022-11-07 17:17 ` Guenter Roeck
2022-11-11 12:48 ` Masami Hiramatsu [this message]
2022-11-16  0:16 ` [EXT] " Arun Easi
2022-11-17  2:53 ` Steven Rostedt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221111214849.895359f49037ec6cf21292a3@kernel.org \
    --to=mhiramat@kernel.org \
    --cc=aeasi@marvell.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=rostedt@goodmis.org \
    --cc=shraash@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®