From: kernel test robot <lkp@intel.com>
To: Christophe Leroy <christophe.leroy@csgroup.eu>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Paul Mackerras <paulus@samba.org>,
Michael Ellerman <mpe@ellerman.id.au>
Cc: kbuild-all@lists.01.org, linuxppc-dev@lists.ozlabs.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 1/5] powerpc/inst: Refactor ___get_user_instr()
Date: Mon, 29 Nov 2021 22:36:20 +0800 [thread overview]
Message-ID: <202111292213.TqMVcy38-lkp@intel.com> (raw)
In-Reply-To: <97a171efd8c582e2bae82c31f2a9519823a20d3f.1638186773.git.christophe.leroy@csgroup.eu>
Hi Christophe,
I love your patch! Perhaps something to improve:
[auto build test WARNING on powerpc/next]
[also build test WARNING on v5.16-rc3 next-20211129]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Christophe-Leroy/powerpc-inst-Refactor-___get_user_instr/20211129-195613
base: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
config: powerpc-allyesconfig (https://download.01.org/0day-ci/archive/20211129/202111292213.TqMVcy38-lkp@intel.com/config)
compiler: powerpc-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/12f08114cece066b2640aef99e2bc74f49eebef5
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Christophe-Leroy/powerpc-inst-Refactor-___get_user_instr/20211129-195613
git checkout 12f08114cece066b2640aef99e2bc74f49eebef5
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=powerpc SHELL=/bin/bash arch/powerpc/kernel/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
In file included from arch/powerpc/include/asm/hw_breakpoint.h:13,
from arch/powerpc/include/asm/processor.h:43,
from arch/powerpc/include/asm/thread_info.h:40,
from include/linux/thread_info.h:60,
from include/asm-generic/preempt.h:5,
from ./arch/powerpc/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:78,
from include/linux/spinlock.h:55,
from include/linux/mmzone.h:8,
from include/linux/gfp.h:6,
from include/linux/mm.h:10,
from arch/powerpc/kernel/align.c:17:
arch/powerpc/kernel/align.c: In function 'fix_alignment':
>> arch/powerpc/include/asm/inst.h:12:32: warning: variable '__suffix' set but not used [-Wunused-but-set-variable]
12 | unsigned int __prefix, __suffix; \
| ^~~~~~~~
arch/powerpc/include/asm/inst.h:31:34: note: in expansion of macro '___get_user_instr'
31 | #define __get_user_instr(x, ptr) ___get_user_instr(__get_user, x, ptr)
| ^~~~~~~~~~~~~~~~~
arch/powerpc/kernel/align.c:310:21: note: in expansion of macro '__get_user_instr'
310 | r = __get_user_instr(instr, (void __user *)regs->nip);
| ^~~~~~~~~~~~~~~~
--
In file included from arch/powerpc/include/asm/hw_breakpoint.h:13,
from arch/powerpc/include/asm/processor.h:43,
from arch/powerpc/include/asm/thread_info.h:40,
from include/linux/thread_info.h:60,
from arch/powerpc/include/asm/ptrace.h:323,
from arch/powerpc/include/asm/hw_irq.h:12,
from arch/powerpc/include/asm/irqflags.h:12,
from include/linux/irqflags.h:16,
from include/asm-generic/cmpxchg-local.h:6,
from arch/powerpc/include/asm/cmpxchg.h:526,
from arch/powerpc/include/asm/atomic.h:11,
from include/linux/atomic.h:7,
from include/linux/rcupdate.h:25,
from include/linux/rculist.h:11,
from include/linux/pid.h:5,
from include/linux/sched.h:14,
from include/linux/uaccess.h:8,
from arch/powerpc/kernel/hw_breakpoint_constraints.c:3:
arch/powerpc/kernel/hw_breakpoint_constraints.c: In function 'wp_get_instr_detail':
>> arch/powerpc/include/asm/inst.h:12:32: warning: variable '__suffix' set but not used [-Wunused-but-set-variable]
12 | unsigned int __prefix, __suffix; \
| ^~~~~~~~
arch/powerpc/include/asm/inst.h:31:34: note: in expansion of macro '___get_user_instr'
31 | #define __get_user_instr(x, ptr) ___get_user_instr(__get_user, x, ptr)
| ^~~~~~~~~~~~~~~~~
arch/powerpc/kernel/hw_breakpoint_constraints.c:135:13: note: in expansion of macro '__get_user_instr'
135 | if (__get_user_instr(*instr, (void __user *)regs->nip))
| ^~~~~~~~~~~~~~~~
--
In file included from arch/powerpc/include/asm/hw_breakpoint.h:13,
from arch/powerpc/include/asm/processor.h:43,
from arch/powerpc/include/asm/thread_info.h:40,
from include/linux/thread_info.h:60,
from arch/powerpc/include/asm/ptrace.h:323,
from arch/powerpc/include/asm/hw_irq.h:12,
from arch/powerpc/include/asm/irqflags.h:12,
from include/linux/irqflags.h:16,
from include/asm-generic/cmpxchg-local.h:6,
from arch/powerpc/include/asm/cmpxchg.h:526,
from arch/powerpc/include/asm/atomic.h:11,
from include/linux/atomic.h:7,
from include/linux/rcupdate.h:25,
from include/linux/rculist.h:11,
from include/linux/pid.h:5,
from include/linux/sched.h:14,
from arch/powerpc/kernel/vecemu.c:8:
arch/powerpc/kernel/vecemu.c: In function 'emulate_altivec':
>> arch/powerpc/include/asm/inst.h:12:32: warning: variable '__suffix' set but not used [-Wunused-but-set-variable]
12 | unsigned int __prefix, __suffix; \
| ^~~~~~~~
arch/powerpc/include/asm/inst.h:29:32: note: in expansion of macro '___get_user_instr'
29 | #define get_user_instr(x, ptr) ___get_user_instr(get_user, x, ptr)
| ^~~~~~~~~~~~~~~~~
arch/powerpc/kernel/vecemu.c:269:13: note: in expansion of macro 'get_user_instr'
269 | if (get_user_instr(instr, (void __user *)regs->nip))
| ^~~~~~~~~~~~~~
vim +/__suffix +12 arch/powerpc/include/asm/inst.h
650b55b707fdfa Jordan Niethe 2020-05-15 6
35506a3e2d7c4d Christophe Leroy 2021-03-10 7 #define ___get_user_instr(gu_op, dest, ptr) \
35506a3e2d7c4d Christophe Leroy 2021-03-10 8 ({ \
042e0860e1c1d6 Christophe Leroy 2021-05-20 9 long __gui_ret; \
9134806e149ebb Christophe Leroy 2021-05-20 10 u32 __user *__gui_ptr = (u32 __user *)ptr; \
35506a3e2d7c4d Christophe Leroy 2021-03-10 11 struct ppc_inst __gui_inst; \
35506a3e2d7c4d Christophe Leroy 2021-03-10 @12 unsigned int __prefix, __suffix; \
b3a9e523237013 Christophe Leroy 2021-05-20 13 \
b3a9e523237013 Christophe Leroy 2021-05-20 14 __chk_user_ptr(ptr); \
9134806e149ebb Christophe Leroy 2021-05-20 15 __gui_ret = gu_op(__prefix, __gui_ptr); \
35506a3e2d7c4d Christophe Leroy 2021-03-10 16 if (__gui_ret == 0) { \
12f08114cece06 Christophe Leroy 2021-11-29 17 if (IS_ENABLED(CONFIG_PPC64) && (__prefix >> 26) == OP_PREFIX) { \
9134806e149ebb Christophe Leroy 2021-05-20 18 __gui_ret = gu_op(__suffix, __gui_ptr + 1); \
042e0860e1c1d6 Christophe Leroy 2021-05-20 19 __gui_inst = ppc_inst_prefix(__prefix, __suffix); \
35506a3e2d7c4d Christophe Leroy 2021-03-10 20 } else { \
35506a3e2d7c4d Christophe Leroy 2021-03-10 21 __gui_inst = ppc_inst(__prefix); \
35506a3e2d7c4d Christophe Leroy 2021-03-10 22 } \
35506a3e2d7c4d Christophe Leroy 2021-03-10 23 if (__gui_ret == 0) \
35506a3e2d7c4d Christophe Leroy 2021-03-10 24 (dest) = __gui_inst; \
35506a3e2d7c4d Christophe Leroy 2021-03-10 25 } \
35506a3e2d7c4d Christophe Leroy 2021-03-10 26 __gui_ret; \
35506a3e2d7c4d Christophe Leroy 2021-03-10 27 })
35506a3e2d7c4d Christophe Leroy 2021-03-10 28
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
next prev parent reply other threads:[~2021-11-29 14:46 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-29 11:53 [PATCH v4 1/5] powerpc/inst: Refactor ___get_user_instr() Christophe Leroy
2021-11-29 11:53 ` [PATCH v4 2/5] powerpc/inst: Define ppc_inst_t Christophe Leroy
2021-11-29 11:53 ` [PATCH v4 3/5] powerpc/inst: Define ppc_inst_t as u32 on PPC32 Christophe Leroy
2021-11-29 11:53 ` [PATCH v4 4/5] powerpc/inst: Move ppc_inst_t definition in asm/reg.h Christophe Leroy
2021-11-29 11:53 ` [PATCH v4 5/5] powerpc/inst: Optimise copy_inst_from_kernel_nofault() Christophe Leroy
2021-11-29 14:36 ` kernel test robot [this message]
2021-11-29 17:09 ` [PATCH v4 1/5] powerpc/inst: Refactor ___get_user_instr() 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=202111292213.TqMVcy38-lkp@intel.com \
--to=lkp@intel.com \
--cc=benh@kernel.crashing.org \
--cc=christophe.leroy@csgroup.eu \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=paulus@samba.org \
/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;
as well as URLs for NNTP newsgroup(s).