public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* arch/s390/kernel/perf_cpum_cf_diag.c:787 cf_diag_all_copy() warn: ignoring unreachable code.
@ 2021-03-11 11:18 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-03-11 11:18 UTC (permalink / raw)
  To: Thomas Richter
  Cc: kbuild-all, linux-kernel, Vasily Gorbik, Sumanth Korikkar,
	Heiko Carstens

[-- Attachment #1: Type: text/plain, Size: 1969 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   a74e6a014c9d4d4161061f770c9b4f98372ac778
commit: cf6acb8bdb1d829b85a4daa2944bf9e71c93f4b9 s390/cpumf: Add support for complete counter set extraction
date:   2 weeks ago
config: s390-randconfig-m031-20210311 (attached as .config)
compiler: s390-linux-gcc (GCC) 9.3.0

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

smatch warnings:
arch/s390/kernel/perf_cpum_cf_diag.c:787 cf_diag_all_copy() warn: ignoring unreachable code.

vim +787 arch/s390/kernel/perf_cpum_cf_diag.c

   770	
   771	static int cf_diag_all_copy(unsigned long arg, cpumask_t *mask)
   772	{
   773		struct s390_ctrset_read __user *ctrset_read;
   774		unsigned int cpu, cpus, rc;
   775		void __user *uptr;
   776	
   777		ctrset_read = (struct s390_ctrset_read __user *)arg;
   778		uptr = ctrset_read->data;
   779		for_each_cpu(cpu, mask) {
   780			struct cf_diag_csd *csd = per_cpu_ptr(&cf_diag_csd, cpu);
   781			struct s390_ctrset_cpudata __user *ctrset_cpudata;
   782	
   783			ctrset_cpudata = uptr;
   784			debug_sprintf_event(cf_diag_dbg, 5, "%s cpu %d used %zd\n",
   785					    __func__, cpu, csd->used);
   786			rc  = put_user(cpu, &ctrset_cpudata->cpu_nr);
 > 787			rc |= put_user(csd->sets, &ctrset_cpudata->no_sets);
   788			rc |= copy_to_user(ctrset_cpudata->data, csd->data, csd->used);
   789			if (rc)
   790				return -EFAULT;
   791			uptr += sizeof(struct s390_ctrset_cpudata) + csd->used;
   792			cond_resched();
   793		}
   794		cpus = cpumask_weight(mask);
   795		if (put_user(cpus, &ctrset_read->no_cpus))
   796			return -EFAULT;
   797		debug_sprintf_event(cf_diag_dbg, 5, "%s copied %ld\n",
   798				    __func__, uptr - (void __user *)ctrset_read->data);
   799		return 0;
   800	}
   801	

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 24388 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-03-11 11:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-11 11:18 arch/s390/kernel/perf_cpum_cf_diag.c:787 cf_diag_all_copy() warn: ignoring unreachable code kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox