All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Steven Rostedt <rostedt@goodmis.org>,
	linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org
Cc: oe-kbuild-all@lists.linux.dev,
	Masami Hiramatsu <mhiramat@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Linux Memory Management List <linux-mm@kvack.org>,
	Jason Wessel <jason.wessel@windriver.com>,
	Daniel Thompson <danielt@kernel.org>,
	Douglas Anderson <dianders@chromium.org>
Subject: Re: [PATCH 05/12] tracing: kdb: Use tracer_tracing_on/off() instead of setting per CPU disabled
Date: Mon, 5 May 2025 13:05:47 +0800	[thread overview]
Message-ID: <202505051213.exaXF8qp-lkp@intel.com> (raw)
In-Reply-To: <20250502205348.643055437@goodmis.org>

Hi Steven,

kernel test robot noticed the following build warnings:

[auto build test WARNING on trace/for-next]
[also build test WARNING on linus/master v6.15-rc4 next-20250502]
[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/Steven-Rostedt/tracing-mmiotrace-Remove-reference-to-unused-per-CPU-data-pointer/20250503-050317
base:   https://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace for-next
patch link:    https://lore.kernel.org/r/20250502205348.643055437%40goodmis.org
patch subject: [PATCH 05/12] tracing: kdb: Use tracer_tracing_on/off() instead of setting per CPU disabled
config: arc-randconfig-002-20250503 (https://download.01.org/0day-ci/archive/20250505/202505051213.exaXF8qp-lkp@intel.com/config)
compiler: arc-linux-gcc (GCC) 11.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250505/202505051213.exaXF8qp-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202505051213.exaXF8qp-lkp@intel.com/

All warnings (new ones prefixed by >>):

   kernel/trace/trace_kdb.c: In function 'kdb_ftdump':
>> kernel/trace/trace_kdb.c:101:13: warning: unused variable 'cpu' [-Wunused-variable]
     101 |         int cpu;
         |             ^~~


vim +/cpu +101 kernel/trace/trace_kdb.c

955b61e5979847 Jason Wessel     2010-08-05   91  
955b61e5979847 Jason Wessel     2010-08-05   92  /*
955b61e5979847 Jason Wessel     2010-08-05   93   * kdb_ftdump - Dump the ftrace log buffer
955b61e5979847 Jason Wessel     2010-08-05   94   */
955b61e5979847 Jason Wessel     2010-08-05   95  static int kdb_ftdump(int argc, const char **argv)
955b61e5979847 Jason Wessel     2010-08-05   96  {
dbfe67334a1767 Douglas Anderson 2019-03-19   97  	int skip_entries = 0;
19063c776fe745 Jason Wessel     2010-08-05   98  	long cpu_file;
0c10cc2435115c Yuran Pereira    2024-10-28   99  	int err;
03197fc02b3566 Douglas Anderson 2019-03-19  100  	int cnt;
03197fc02b3566 Douglas Anderson 2019-03-19 @101  	int cpu;
955b61e5979847 Jason Wessel     2010-08-05  102  
19063c776fe745 Jason Wessel     2010-08-05  103  	if (argc > 2)
955b61e5979847 Jason Wessel     2010-08-05  104  		return KDB_ARGCOUNT;
955b61e5979847 Jason Wessel     2010-08-05  105  
0c10cc2435115c Yuran Pereira    2024-10-28  106  	if (argc && kstrtoint(argv[1], 0, &skip_entries))
0c10cc2435115c Yuran Pereira    2024-10-28  107  		return KDB_BADINT;
955b61e5979847 Jason Wessel     2010-08-05  108  
19063c776fe745 Jason Wessel     2010-08-05  109  	if (argc == 2) {
0c10cc2435115c Yuran Pereira    2024-10-28  110  		err = kstrtol(argv[2], 0, &cpu_file);
0c10cc2435115c Yuran Pereira    2024-10-28  111  		if (err || cpu_file >= NR_CPUS || cpu_file < 0 ||
19063c776fe745 Jason Wessel     2010-08-05  112  		    !cpu_online(cpu_file))
19063c776fe745 Jason Wessel     2010-08-05  113  			return KDB_BADINT;
19063c776fe745 Jason Wessel     2010-08-05  114  	} else {
ae3b5093ad6004 Steven Rostedt   2013-01-23  115  		cpu_file = RING_BUFFER_ALL_CPUS;
19063c776fe745 Jason Wessel     2010-08-05  116  	}
19063c776fe745 Jason Wessel     2010-08-05  117  
955b61e5979847 Jason Wessel     2010-08-05  118  	kdb_trap_printk++;
03197fc02b3566 Douglas Anderson 2019-03-19  119  
03197fc02b3566 Douglas Anderson 2019-03-19  120  	trace_init_global_iter(&iter);
03197fc02b3566 Douglas Anderson 2019-03-19  121  	iter.buffer_iter = buffer_iter;
03197fc02b3566 Douglas Anderson 2019-03-19  122  
6a4611f6bb763d Steven Rostedt   2025-05-02  123  	tracer_tracing_off(iter.tr);
03197fc02b3566 Douglas Anderson 2019-03-19  124  
03197fc02b3566 Douglas Anderson 2019-03-19  125  	/* A negative skip_entries means skip all but the last entries */
03197fc02b3566 Douglas Anderson 2019-03-19  126  	if (skip_entries < 0) {
03197fc02b3566 Douglas Anderson 2019-03-19  127  		if (cpu_file == RING_BUFFER_ALL_CPUS)
03197fc02b3566 Douglas Anderson 2019-03-19  128  			cnt = trace_total_entries(NULL);
03197fc02b3566 Douglas Anderson 2019-03-19  129  		else
03197fc02b3566 Douglas Anderson 2019-03-19  130  			cnt = trace_total_entries_cpu(NULL, cpu_file);
03197fc02b3566 Douglas Anderson 2019-03-19  131  		skip_entries = max(cnt + skip_entries, 0);
03197fc02b3566 Douglas Anderson 2019-03-19  132  	}
03197fc02b3566 Douglas Anderson 2019-03-19  133  
dbfe67334a1767 Douglas Anderson 2019-03-19  134  	ftrace_dump_buf(skip_entries, cpu_file);
03197fc02b3566 Douglas Anderson 2019-03-19  135  
6a4611f6bb763d Steven Rostedt   2025-05-02  136  	tracer_tracing_on(iter.tr);
03197fc02b3566 Douglas Anderson 2019-03-19  137  
955b61e5979847 Jason Wessel     2010-08-05  138  	kdb_trap_printk--;
955b61e5979847 Jason Wessel     2010-08-05  139  
955b61e5979847 Jason Wessel     2010-08-05  140  	return 0;
955b61e5979847 Jason Wessel     2010-08-05  141  }
955b61e5979847 Jason Wessel     2010-08-05  142  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

  reply	other threads:[~2025-05-05  5:06 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-02 20:51 [PATCH 00/12] tracing: Remove most uses of "disabled" field Steven Rostedt
2025-05-02 20:51 ` [PATCH 01/12] tracing/mmiotrace: Remove reference to unused per CPU data pointer Steven Rostedt
2025-05-02 20:51 ` [PATCH 02/12] tracing: Do not bother setting "disabled" field for ftrace_dump_one() Steven Rostedt
2025-05-02 20:51 ` [PATCH 03/12] ftrace: Do not bother checking per CPU "disabled" flag Steven Rostedt
2025-05-02 20:51 ` [PATCH 04/12] tracing: Just use this_cpu_read() to access ignore_pid Steven Rostedt
2025-05-02 20:51 ` [PATCH 05/12] tracing: kdb: Use tracer_tracing_on/off() instead of setting per CPU disabled Steven Rostedt
2025-05-05  5:05   ` kernel test robot [this message]
2025-05-05 15:42   ` Doug Anderson
2025-05-05 15:59     ` Steven Rostedt
2025-05-02 20:51 ` [PATCH 06/12] ftrace: Do not disabled function graph based on "disabled" field Steven Rostedt
2025-05-02 20:51 ` [PATCH 07/12] tracing: Do not use per CPU array_buffer.data->disabled for cpumask Steven Rostedt
2025-05-02 20:51 ` [PATCH 08/12] ring-buffer: Add ring_buffer_record_is_on_cpu() Steven Rostedt
2025-05-02 20:51 ` [PATCH 09/12] tracing: branch: Use trace_tracing_is_on_cpu() instead of "disabled" field Steven Rostedt
2025-05-03 10:10   ` kernel test robot
2025-05-05 12:11   ` kernel test robot
2025-05-02 20:51 ` [PATCH 10/12] tracing: Convert the per CPU "disabled" counter to local from atomic Steven Rostedt
2025-05-02 20:51 ` [PATCH 11/12] tracing: Use atomic_inc_return() for updating "disabled" counter in irqsoff tracer Steven Rostedt
2025-05-02 20:51 ` [PATCH 12/12] tracing: Remove unused buffer_page field from trace_array_cpu structure 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=202505051213.exaXF8qp-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=danielt@kernel.org \
    --cc=dianders@chromium.org \
    --cc=jason.wessel@windriver.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mhiramat@kernel.org \
    --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.