* arch/powerpc/lib/sstep.c:329:1: warning: Label 'Efault' is not used. There is #if in function body so the label might be used in code that is removed by the preprocessor. [unusedLabelConfiguration]
@ 2022-04-04 19:09 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2022-04-04 19:09 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 5763 bytes --]
CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
CC: linux-kernel(a)vger.kernel.org
TO: Christophe Leroy <christophe.leroy@csgroup.eu>
CC: Michael Ellerman <mpe@ellerman.id.au>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 3123109284176b1532874591f7c81f3837bbdc17
commit: e28d0b675056d072f1f11fa644d0efbb016bb7ce powerpc/lib/sstep: Don't use __{get/put}_user() on kernel addresses
date: 6 months ago
:::::: branch date: 22 hours ago
:::::: commit date: 6 months ago
compiler: powerpc64-linux-gcc (GCC) 11.2.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
cppcheck possible warnings: (new ones prefixed by >>, may not real problems)
>> drivers/edac/edac_mc.c:502:62: warning: Parameter 'dev' can be declared with const [constParameter]
static struct mem_ctl_info *__find_mci_by_dev(struct device *dev)
^
>> drivers/edac/edac_mc.c:703:3: warning: There is an unknown macro here somewhere. Configuration is required. If mci_for_each_dimm is a macro then please configure it. [unknownMacro]
mci_for_each_dimm(mci, dimm)
^
--
>> drivers/base/power/wakeup.c:413:2: warning: There is an unknown macro here somewhere. Configuration is required. If list_for_each_entry_rcu is a macro then please configure it. [unknownMacro]
list_for_each_entry_rcu_locked(ws, &wakeup_sources, entry)
^
--
arch/powerpc/lib/sstep.c:1635:9: warning: Shifting a negative value is technically undefined behaviour [shiftNegativeLHS]
imm = MASK32(mb, me);
^
arch/powerpc/lib/sstep.c:1643:31: warning: Shifting a negative value is technically undefined behaviour [shiftNegativeLHS]
op->val = ROTATE(val, rb) & MASK32(mb, me);
^
arch/powerpc/lib/sstep.c:1651:31: warning: Shifting a negative value is technically undefined behaviour [shiftNegativeLHS]
op->val = ROTATE(val, rb) & MASK32(mb, me);
^
>> arch/powerpc/lib/sstep.c:329:1: warning: Label 'Efault' is not used. There is #if in function body so the label might be used in code that is removed by the preprocessor. [unusedLabelConfiguration]
Efault:
^
arch/powerpc/lib/sstep.c:386:1: warning: Label 'Efault' is not used. There is #if in function body so the label might be used in code that is removed by the preprocessor. [unusedLabelConfiguration]
Efault:
^
arch/powerpc/lib/sstep.c:465:1: warning: Label 'Efault' is not used. There is #if in function body so the label might be used in code that is removed by the preprocessor. [unusedLabelConfiguration]
Efault:
^
arch/powerpc/lib/sstep.c:522:1: warning: Label 'Efault' is not used. There is #if in function body so the label might be used in code that is removed by the preprocessor. [unusedLabelConfiguration]
Efault:
^
arch/powerpc/lib/sstep.c:656:8: warning: Overlapping read/write of union is undefined behavior [overlappingWriteUnion]
u.u = u.l[0];
^
arch/powerpc/lib/sstep.c:2232:33: warning: Unsigned expression '63-sh' can't be negative so it is unnecessary to test it. [unsignedPositive]
op->val = ROTATE(val, sh) & MASK64(0, 63 - sh);
^
arch/powerpc/lib/sstep.c:2201:19: warning: Shifting signed 64-bit value by 63 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
op->val = ival >> (sh < 64 ? sh : 63);
^
vim +/Efault +329 arch/powerpc/lib/sstep.c
d955189ae42796 Paul Mackerras 2017-08-30 304
e28d0b675056d0 Christophe Leroy 2021-09-16 305 static __always_inline int
e28d0b675056d0 Christophe Leroy 2021-09-16 306 __read_mem_aligned(unsigned long *dest, unsigned long ea, int nb, struct pt_regs *regs)
0016a4cf558241 Paul Mackerras 2010-06-15 307 {
0016a4cf558241 Paul Mackerras 2010-06-15 308 unsigned long x = 0;
0016a4cf558241 Paul Mackerras 2010-06-15 309
0016a4cf558241 Paul Mackerras 2010-06-15 310 switch (nb) {
0016a4cf558241 Paul Mackerras 2010-06-15 311 case 1:
e28d0b675056d0 Christophe Leroy 2021-09-16 312 unsafe_get_user(x, (unsigned char __user *)ea, Efault);
0016a4cf558241 Paul Mackerras 2010-06-15 313 break;
0016a4cf558241 Paul Mackerras 2010-06-15 314 case 2:
e28d0b675056d0 Christophe Leroy 2021-09-16 315 unsafe_get_user(x, (unsigned short __user *)ea, Efault);
0016a4cf558241 Paul Mackerras 2010-06-15 316 break;
0016a4cf558241 Paul Mackerras 2010-06-15 317 case 4:
e28d0b675056d0 Christophe Leroy 2021-09-16 318 unsafe_get_user(x, (unsigned int __user *)ea, Efault);
0016a4cf558241 Paul Mackerras 2010-06-15 319 break;
0016a4cf558241 Paul Mackerras 2010-06-15 320 #ifdef __powerpc64__
0016a4cf558241 Paul Mackerras 2010-06-15 321 case 8:
e28d0b675056d0 Christophe Leroy 2021-09-16 322 unsafe_get_user(x, (unsigned long __user *)ea, Efault);
0016a4cf558241 Paul Mackerras 2010-06-15 323 break;
0016a4cf558241 Paul Mackerras 2010-06-15 324 #endif
0016a4cf558241 Paul Mackerras 2010-06-15 325 }
0016a4cf558241 Paul Mackerras 2010-06-15 326 *dest = x;
e28d0b675056d0 Christophe Leroy 2021-09-16 327 return 0;
e28d0b675056d0 Christophe Leroy 2021-09-16 328
e28d0b675056d0 Christophe Leroy 2021-09-16 @329 Efault:
e28d0b675056d0 Christophe Leroy 2021-09-16 330 regs->dar = ea;
e28d0b675056d0 Christophe Leroy 2021-09-16 331 return -EFAULT;
e28d0b675056d0 Christophe Leroy 2021-09-16 332 }
e28d0b675056d0 Christophe Leroy 2021-09-16 333
--
0-DAY CI Kernel Test Service
https://01.org/lkp
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-04-04 19:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-04 19:09 arch/powerpc/lib/sstep.c:329:1: warning: Label 'Efault' is not used. There is #if in function body so the label might be used in code that is removed by the preprocessor. [unusedLabelConfiguration] kernel test robot
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.