All of lore.kernel.org
 help / color / mirror / Atom feed
From: Masami Hiramatsu (Google) <mhiramat@kernel.org>
To: kernel test robot <lkp@intel.com>
Cc: David Howells <dhowells@redhat.com>,
	rostedt@goodmis.org, mhiramat@kernel.org,
	oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] trace: Fix some checker warnings
Date: Mon, 5 Dec 2022 11:22:36 +0900	[thread overview]
Message-ID: <20221205112236.f99c6104e988aa4f3dd89cd0@kernel.org> (raw)
In-Reply-To: <202212022034.OqPXTS9u-lkp@intel.com>

On Fri, 2 Dec 2022 20:43:15 +0800
kernel test robot <lkp@intel.com> wrote:

> Hi David,
> 
> I love your patch! Yet something to improve:
> 
> [auto build test ERROR on linus/master]
> [also build test ERROR on v6.1-rc7 next-20221202]
> [If your patch is applied to the wrong git tree, kindly drop us a note.
> And when submitting patch, we suggest to use '--base' as documented in
> https://git-scm.com/docs/git-format-patch#_base_tree_information]
> 
> url:    https://github.com/intel-lab-lkp/linux/commits/David-Howells/trace-Fix-some-checker-warnings/20221202-040957
> patch link:    https://lore.kernel.org/r/166992525941.1716618.13740663757583361463.stgit%40warthog.procyon.org.uk
> patch subject: [PATCH] trace: Fix some checker warnings
> config: i386-randconfig-a012
> compiler: gcc-11 (Debian 11.3.0-8) 11.3.0
> reproduce (this is a W=1 build):
>         # https://github.com/intel-lab-lkp/linux/commit/90c2da2e191f0b26e8194f45579e8227c9950fa8
>         git remote add linux-review https://github.com/intel-lab-lkp/linux
>         git fetch --no-tags linux-review David-Howells/trace-Fix-some-checker-warnings/20221202-040957
>         git checkout 90c2da2e191f0b26e8194f45579e8227c9950fa8
>         # save the config file
>         mkdir build_dir && cp config build_dir/.config
>         make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash
> 
> If you fix the issue, kindly add following tag where applicable
> | Reported-by: kernel test robot <lkp@intel.com>
> 
> All errors (new ones prefixed by >>):
> 
>    kernel/trace/trace.c: In function 'trace_create_maxlat_file':
> >> kernel/trace/trace.c:1725:48: error: 'tracing_max_lat_fops' undeclared (first use in this function); did you mean 'trace_min_max_fops'?
>     1725 |                                               &tracing_max_lat_fops);
>          |                                                ^~~~~~~~~~~~~~~~~~~~
>          |                                                trace_min_max_fops
>    kernel/trace/trace.c:1725:48: note: each undeclared identifier is reported only once for each function it appears in
> 

This is not an error introduced by this patch, but the osnoise introduced this.
tracing_max_lat_fops is used from max latency tracer, hwlat tracer and osnoise
tracer, but it is defined only when the CONFIG_TRACER_MAX_TRACE and
CONFIG_HWLAT_TRACER.

commit 424b650f35c7 ("tracing: Fix missing osnoise tracer on max_latency")
may not enough. We need to add more CONFIG_OSNOISE_TRACER checks like below.

I think it is the time to introduce a shared config CONFIG_MAX_TRACE
for all those users to simplify the #ifdefs.

diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 5cfc95a52bc3..14f18edfe5bc 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -6572,7 +6572,8 @@ tracing_thresh_write(struct file *filp, const char __user *ubuf,
 	return ret;
 }
 
-#if defined(CONFIG_TRACER_MAX_TRACE) || defined(CONFIG_HWLAT_TRACER)
+#if defined(CONFIG_TRACER_MAX_TRACE) || defined(CONFIG_HWLAT_TRACER) \
+	|| defined(CONFIG_OSNOISE_TRACER)
 
 static ssize_t
 tracing_max_lat_read(struct file *filp, char __user *ubuf,
@@ -7587,7 +7588,8 @@ static const struct file_operations tracing_thresh_fops = {
 	.llseek		= generic_file_llseek,
 };
 
-#if defined(CONFIG_TRACER_MAX_TRACE) || defined(CONFIG_HWLAT_TRACER)
+#if defined(CONFIG_TRACER_MAX_TRACE) || defined(CONFIG_HWLAT_TRACER) \
+	|| defined(CONFIG_OSNOISE_TRACER)
 static const struct file_operations tracing_max_lat_fops = {
 	.open		= tracing_open_generic,
 	.read		= tracing_max_lat_read,

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

  reply	other threads:[~2022-12-05  2:22 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-01 20:07 [PATCH] trace: Fix some checker warnings David Howells
2022-12-02 12:43 ` kernel test robot
2022-12-05  2:22   ` Masami Hiramatsu [this message]
2022-12-05  2:39     ` Steven Rostedt
2022-12-05  3:11       ` Masami Hiramatsu
2022-12-05  3:29         ` Steven Rostedt
2022-12-05  3:29       ` Masami Hiramatsu
2022-12-05  3:33         ` Steven Rostedt
2022-12-02 14:24 ` kernel test robot
2022-12-05  3:32 ` Masami Hiramatsu
2022-12-05  8:28   ` David Howells
2022-12-05  9:06     ` Masami Hiramatsu
2022-12-05 10:22       ` David Howells
2022-12-05 10:29       ` David Howells
2022-12-06 13:59         ` Masami Hiramatsu
2022-12-05 14:40       ` [PATCH] tracing: Fix complicated dependency of kernel test robot
2022-12-05 15:10       ` kernel test robot
2022-12-06 12:56         ` Masami Hiramatsu

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=20221205112236.f99c6104e988aa4f3dd89cd0@kernel.org \
    --to=mhiramat@kernel.org \
    --cc=dhowells@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=rostedt@goodmis.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.