[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202103111949.bKybCWr6-lkp@intel.com>
Date: Thu, 11 Mar 2021 19:18:57 +0800
From: kernel test robot <lkp@...el.com>
To: Thomas Richter <tmricht@...ux.ibm.com>
Cc: kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
Vasily Gorbik <gor@...ux.ibm.com>,
Sumanth Korikkar <sumanthk@...ux.ibm.com>,
Heiko Carstens <hca@...ux.ibm.com>
Subject: arch/s390/kernel/perf_cpum_cf_diag.c:787 cf_diag_all_copy() warn:
ignoring unreachable code.
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@...el.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
Download attachment ".config.gz" of type "application/gzip" (24388 bytes)
Powered by blists - more mailing lists