llvm.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Steven Rostedt <rostedt@goodmis.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Linux Trace Kernel <linux-trace-kernel@vger.kernel.org>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	Masami Hiramatsu <mhiramat@kernel.org>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	Tom Zanussi <zanussi@kernel.org>
Subject: Re: [PATCH] tracing: Add system trigger file to enable triggers for all the system's events
Date: Sat, 22 Nov 2025 07:53:36 +0800	[thread overview]
Message-ID: <202511220730.PQFWRcck-lkp@intel.com> (raw)
In-Reply-To: <20251120160003.2fa33d80@gandalf.local.home>

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.18-rc6 next-20251121]
[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-Add-system-trigger-file-to-enable-triggers-for-all-the-system-s-events/20251121-050454
base:   https://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace for-next
patch link:    https://lore.kernel.org/r/20251120160003.2fa33d80%40gandalf.local.home
patch subject: [PATCH] tracing: Add system trigger file to enable triggers for all the system's events
config: sparc64-defconfig (https://download.01.org/0day-ci/archive/20251122/202511220730.PQFWRcck-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251122/202511220730.PQFWRcck-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/202511220730.PQFWRcck-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> kernel/trace/trace_events_trigger.c:432:6: warning: variable 'len' set but not used [-Wunused-but-set-variable]
     432 |         int len;
         |             ^
   1 warning generated.


vim +/len +432 kernel/trace/trace_events_trigger.c

   420	
   421	static ssize_t
   422	event_system_trigger_write(struct file *filp, const char __user *ubuf,
   423			    size_t cnt, loff_t *ppos)
   424	{
   425		struct trace_subsystem_dir *dir = filp->private_data;
   426		struct event_command *p;
   427		char *command, *next;
   428		char *buf __free(kfree) = get_user_buf(ubuf, cnt);
   429		bool remove = false;
   430		bool found = false;
   431		ssize_t ret;
 > 432		int len;
   433	
   434		if (!buf)
   435			return 0;
   436	
   437		if (IS_ERR(buf))
   438			return PTR_ERR(buf);
   439	
   440		/* system triggers are not allowed to have counters */
   441		if (strchr(buf, ':'))
   442			return -EINVAL;
   443	
   444		/* If opened for read too, dir is in the seq_file descriptor */
   445		if (filp->f_mode & FMODE_READ) {
   446			struct seq_file *m = filp->private_data;
   447			dir = m->private;
   448		}
   449	
   450		/* Skip added space at beginning of buf */
   451		next = buf;
   452		strim(next);
   453	
   454		command = strsep(&next, " \t");
   455		if (next) {
   456			next = skip_spaces(next);
   457			if (!*next)
   458				next = NULL;
   459		}
   460		if (command[0] == '!') {
   461			remove = true;
   462			command++;
   463		}
   464	
   465		len = strlen(command);
   466		if (next)
   467			len += strlen(next) + 1;
   468	
   469		guard(mutex)(&event_mutex);
   470		guard(mutex)(&trigger_cmd_mutex);
   471	
   472		list_for_each_entry(p, &trigger_commands, list) {
   473			/* Allow to remove any trigger */
   474			if (!remove && !(p->flags & EVENT_CMD_FL_SYSTEM))
   475				continue;
   476			if (strcmp(p->name, command) == 0) {
   477				found = true;
   478				ret = process_system_events(dir, p, buf, command, next);
   479				break;
   480			}
   481		}
   482	
   483		if (!found)
   484			ret = -ENODEV;
   485	
   486		if (!ret)
   487			*ppos += cnt;
   488	
   489		if (remove || ret < 0)
   490			return ret ? : cnt;
   491	
   492		return cnt;
   493	}
   494	

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

           reply	other threads:[~2025-11-21 23:54 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <20251120160003.2fa33d80@gandalf.local.home>]

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=202511220730.PQFWRcck-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mhiramat@kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=rostedt@goodmis.org \
    --cc=zanussi@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).