All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Dan Carpenter <error27@gmail.com>
Subject: arch/s390/kernel/perf_cpum_cf.c:306 cpum_cf_alloc() error: uninitialized symbol 'rc'.
Date: Sun, 10 Dec 2023 21:44:35 +0800	[thread overview]
Message-ID: <202312102155.RbBlpK49-lkp@intel.com> (raw)

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: Thomas Richter <tmricht@linux.ibm.com>
CC: Alexander Gordeev <agordeev@linux.ibm.com>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   c527f5606aa545233a4d2c6d5c636ed82b8633ef
commit: 9b9cf3c77e7e090b30657b3d2c288deb58dfb4f2 s390/cpum_cf: rework PER_CPU_DEFINE of struct cpu_cf_events
date:   6 months ago
:::::: branch date: 10 hours ago
:::::: commit date: 6 months ago
config: s390-randconfig-r071-20231115 (https://download.01.org/0day-ci/archive/20231210/202312102155.RbBlpK49-lkp@intel.com/config)
compiler: s390-linux-gcc (GCC) 13.2.0
reproduce: (https://download.01.org/0day-ci/archive/20231210/202312102155.RbBlpK49-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>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202312102155.RbBlpK49-lkp@intel.com/

New smatch warnings:
arch/s390/kernel/perf_cpum_cf.c:306 cpum_cf_alloc() error: uninitialized symbol 'rc'.

Old smatch warnings:
arch/s390/kernel/perf_cpum_cf.c:1505 cfset_all_copy() warn: ignoring unreachable code.

vim +/rc +306 arch/s390/kernel/perf_cpum_cf.c

9b9cf3c77e7e09 Thomas Richter 2023-06-15  275  
9b9cf3c77e7e09 Thomas Richter 2023-06-15  276  /*
9b9cf3c77e7e09 Thomas Richter 2023-06-15  277   * Create/delete per CPU data structures for /dev/hwctr interface and events
9b9cf3c77e7e09 Thomas Richter 2023-06-15  278   * created by perf_event_open().
9b9cf3c77e7e09 Thomas Richter 2023-06-15  279   * If cpu is -1, track task on all available CPUs. This requires
9b9cf3c77e7e09 Thomas Richter 2023-06-15  280   * allocation of hardware data structures for all CPUs. This setup handles
9b9cf3c77e7e09 Thomas Richter 2023-06-15  281   * perf_event_open() with task context and /dev/hwctr interface.
9b9cf3c77e7e09 Thomas Richter 2023-06-15  282   * If cpu is non-zero install event on this CPU only. This setup handles
9b9cf3c77e7e09 Thomas Richter 2023-06-15  283   * perf_event_open() with CPU context.
9b9cf3c77e7e09 Thomas Richter 2023-06-15  284   */
9b9cf3c77e7e09 Thomas Richter 2023-06-15  285  static int cpum_cf_alloc(int cpu)
9b9cf3c77e7e09 Thomas Richter 2023-06-15  286  {
9b9cf3c77e7e09 Thomas Richter 2023-06-15  287  	cpumask_var_t mask;
9b9cf3c77e7e09 Thomas Richter 2023-06-15  288  	int rc;
9b9cf3c77e7e09 Thomas Richter 2023-06-15  289  
9b9cf3c77e7e09 Thomas Richter 2023-06-15  290  	if (cpu == -1) {
9b9cf3c77e7e09 Thomas Richter 2023-06-15  291  		if (!zalloc_cpumask_var(&mask, GFP_KERNEL))
9b9cf3c77e7e09 Thomas Richter 2023-06-15  292  			return -ENOMEM;
9b9cf3c77e7e09 Thomas Richter 2023-06-15  293  		for_each_online_cpu(cpu) {
9b9cf3c77e7e09 Thomas Richter 2023-06-15  294  			rc = cpum_cf_alloc_cpu(cpu);
9b9cf3c77e7e09 Thomas Richter 2023-06-15  295  			if (rc) {
9b9cf3c77e7e09 Thomas Richter 2023-06-15  296  				for_each_cpu(cpu, mask)
9b9cf3c77e7e09 Thomas Richter 2023-06-15  297  					cpum_cf_free_cpu(cpu);
9b9cf3c77e7e09 Thomas Richter 2023-06-15  298  				break;
9b9cf3c77e7e09 Thomas Richter 2023-06-15  299  			}
9b9cf3c77e7e09 Thomas Richter 2023-06-15  300  			cpumask_set_cpu(cpu, mask);
9b9cf3c77e7e09 Thomas Richter 2023-06-15  301  		}
9b9cf3c77e7e09 Thomas Richter 2023-06-15  302  		free_cpumask_var(mask);
9b9cf3c77e7e09 Thomas Richter 2023-06-15  303  	} else {
9b9cf3c77e7e09 Thomas Richter 2023-06-15  304  		rc = cpum_cf_alloc_cpu(cpu);
9b9cf3c77e7e09 Thomas Richter 2023-06-15  305  	}
9b9cf3c77e7e09 Thomas Richter 2023-06-15 @306  	return rc;
9b9cf3c77e7e09 Thomas Richter 2023-06-15  307  }
9b9cf3c77e7e09 Thomas Richter 2023-06-15  308  

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

             reply	other threads:[~2023-12-10 13:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-10 13:44 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-11-15 22:27 arch/s390/kernel/perf_cpum_cf.c:306 cpum_cf_alloc() error: uninitialized symbol 'rc' kernel test robot

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=202312102155.RbBlpK49-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=error27@gmail.com \
    --cc=oe-kbuild@lists.linux.dev \
    /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.