linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: "Steven Rostedt (VMware)" <rostedt@goodmis.org>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
	linux-kernel@vger.kernel.org
Subject: [rostedt-trace:for-next 2/3] kernel/trace/trace_events.c:2681:25: warning: variable 'no_pid_list' set but not used
Date: Sun, 28 Nov 2021 04:58:12 +0800	[thread overview]
Message-ID: <202111280401.qC0z99JB-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git for-next
head:   a55f224ff5f238013de8762c4287117e47b86e22
commit: 6cb206508b621a9a0a2c35b60540e399225c8243 [2/3] tracing: Check pid filtering when creating events
config: hexagon-randconfig-r045-20211128 (https://download.01.org/0day-ci/archive/20211128/202111280401.qC0z99JB-lkp@intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 5162b558d8c0b542e752b037e72a69d5fd51eb1e)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git/commit/?id=6cb206508b621a9a0a2c35b60540e399225c8243
        git remote add rostedt-trace https://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git
        git fetch --no-tags rostedt-trace for-next
        git checkout 6cb206508b621a9a0a2c35b60540e399225c8243
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

>> kernel/trace/trace_events.c:2681:25: warning: variable 'no_pid_list' set but not used [-Wunused-but-set-variable]
           struct trace_pid_list *no_pid_list;
                                  ^
   1 warning generated.


vim +/no_pid_list +2681 kernel/trace/trace_events.c

  2676	
  2677	static struct trace_event_file *
  2678	trace_create_new_event(struct trace_event_call *call,
  2679			       struct trace_array *tr)
  2680	{
> 2681		struct trace_pid_list *no_pid_list;
  2682		struct trace_pid_list *pid_list;
  2683		struct trace_event_file *file;
  2684		unsigned int first;
  2685	
  2686		file = kmem_cache_alloc(file_cachep, GFP_TRACE);
  2687		if (!file)
  2688			return NULL;
  2689	
  2690		pid_list = rcu_dereference_protected(tr->filtered_pids,
  2691						     lockdep_is_held(&event_mutex));
  2692		no_pid_list = rcu_dereference_protected(tr->filtered_no_pids,
  2693						     lockdep_is_held(&event_mutex));
  2694	
  2695		if (!trace_pid_list_first(pid_list, &first) ||
  2696		    !trace_pid_list_first(pid_list, &first))
  2697			file->flags |= EVENT_FILE_FL_PID_FILTER;
  2698	
  2699		file->event_call = call;
  2700		file->tr = tr;
  2701		atomic_set(&file->sm_ref, 0);
  2702		atomic_set(&file->tm_ref, 0);
  2703		INIT_LIST_HEAD(&file->triggers);
  2704		list_add(&file->list, &tr->events);
  2705	
  2706		return file;
  2707	}
  2708	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

                 reply	other threads:[~2021-11-27 21:01 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202111280401.qC0z99JB-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@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 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).