public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Thomas Richter <tmricht@linux.ibm.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	Vasily Gorbik <gor@linux.ibm.com>,
	Sumanth Korikkar <sumanthk@linux.ibm.com>,
	Heiko Carstens <hca@linux.ibm.com>
Subject: arch/s390/kernel/perf_cpum_cf_diag.c:787 cf_diag_all_copy() warn: ignoring unreachable code.
Date: Thu, 11 Mar 2021 19:18:57 +0800	[thread overview]
Message-ID: <202103111949.bKybCWr6-lkp@intel.com> (raw)

[-- 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 --]

                 reply	other threads:[~2021-03-11 11:20 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=202103111949.bKybCWr6-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=gor@linux.ibm.com \
    --cc=hca@linux.ibm.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sumanthk@linux.ibm.com \
    --cc=tmricht@linux.ibm.com \
    /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