[hch-misc:m68k-set_fs 5/6] arch/m68k/include/asm/uaccess.h:197:7: warning: variable '__gk_dst' set but not used
From: kernel test robot
Date: Thu Jul 08 2021 - 01:17:28 EST
tree: git://git.infradead.org/users/hch/misc.git m68k-set_fs
head: dc7590aca76df8c1ead0ebf59e3787d5555779d6
commit: bd01d8a7268b406331c39707183b2c42626eff8e [5/6] m68k: provide __{get,put}_kernel_nofault
config: m68k-randconfig-r035-20210707 (attached as .config)
compiler: m68k-linux-gcc (GCC) 9.3.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
git remote add hch-misc git://git.infradead.org/users/hch/misc.git
git fetch --no-tags hch-misc m68k-set_fs
git checkout bd01d8a7268b406331c39707183b2c42626eff8e
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=m68k
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>
All warnings (new ones prefixed by >>):
In file included from include/linux/uaccess.h:11,
from include/linux/sched/task.h:11,
from include/linux/sched/signal.h:9,
from include/linux/rcuwait.h:6,
from include/linux/percpu-rwsem.h:7,
from include/linux/fs.h:33,
from include/linux/huge_mm.h:8,
from include/linux/mm.h:725,
from mm/maccess.c:6:
mm/maccess.c: In function 'copy_from_kernel_nofault':
>> arch/m68k/include/asm/uaccess.h:197:7: warning: variable '__gk_dst' set but not used [-Wunused-but-set-variable]
197 | type __gk_dst = *(type *)(dst); \
| ^~~~~~~~
mm/maccess.c:19:3: note: in expansion of macro '__get_kernel_nofault'
19 | __get_kernel_nofault(dst, src, type, err_label); \
| ^~~~~~~~~~~~~~~~~~~~
mm/maccess.c:31:2: note: in expansion of macro 'copy_from_kernel_nofault_loop'
31 | copy_from_kernel_nofault_loop(dst, src, size, u64, Efault);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> arch/m68k/include/asm/uaccess.h:197:7: warning: variable '__gk_dst' set but not used [-Wunused-but-set-variable]
197 | type __gk_dst = *(type *)(dst); \
| ^~~~~~~~
mm/maccess.c:19:3: note: in expansion of macro '__get_kernel_nofault'
19 | __get_kernel_nofault(dst, src, type, err_label); \
| ^~~~~~~~~~~~~~~~~~~~
mm/maccess.c:32:2: note: in expansion of macro 'copy_from_kernel_nofault_loop'
32 | copy_from_kernel_nofault_loop(dst, src, size, u32, Efault);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> arch/m68k/include/asm/uaccess.h:197:7: warning: variable '__gk_dst' set but not used [-Wunused-but-set-variable]
197 | type __gk_dst = *(type *)(dst); \
| ^~~~~~~~
mm/maccess.c:19:3: note: in expansion of macro '__get_kernel_nofault'
19 | __get_kernel_nofault(dst, src, type, err_label); \
| ^~~~~~~~~~~~~~~~~~~~
mm/maccess.c:33:2: note: in expansion of macro 'copy_from_kernel_nofault_loop'
33 | copy_from_kernel_nofault_loop(dst, src, size, u16, Efault);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> arch/m68k/include/asm/uaccess.h:197:7: warning: variable '__gk_dst' set but not used [-Wunused-but-set-variable]
197 | type __gk_dst = *(type *)(dst); \
| ^~~~~~~~
mm/maccess.c:19:3: note: in expansion of macro '__get_kernel_nofault'
19 | __get_kernel_nofault(dst, src, type, err_label); \
| ^~~~~~~~~~~~~~~~~~~~
mm/maccess.c:34:2: note: in expansion of macro 'copy_from_kernel_nofault_loop'
34 | copy_from_kernel_nofault_loop(dst, src, size, u8, Efault);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mm/maccess.c: In function 'strncpy_from_kernel_nofault':
>> arch/m68k/include/asm/uaccess.h:197:7: warning: variable '__gk_dst' set but not used [-Wunused-but-set-variable]
197 | type __gk_dst = *(type *)(dst); \
| ^~~~~~~~
mm/maccess.c:76:3: note: in expansion of macro '__get_kernel_nofault'
76 | __get_kernel_nofault(dst, src, u8, Efault);
| ^~~~~~~~~~~~~~~~~~~~
vim +/__gk_dst +197 arch/m68k/include/asm/uaccess.h
194
195 #define __get_kernel_nofault(dst, src, type, err_label) \
196 do { \
> 197 type __gk_dst = *(type *)(dst); \
198 type *__gk_src = (type *)(src); \
199 int __gk_err = 0; \
200 \
201 switch (sizeof(type)) { \
202 case 1: \
203 __get_user_asm("move", __gk_err, __gk_dst, __gk_src, u8, b, d); \
204 break; \
205 case 2: \
206 __get_user_asm("move", __gk_err, __gk_dst, __gk_src, u16, w, r); \
207 break; \
208 case 4: \
209 __get_user_asm("move", __gk_err, __gk_dst, __gk_src, u32, l, r); \
210 break; \
211 case 8: \
212 __get_user_asm8("move", __gk_err, __gk_dst, __gk_src); \
213 break; \
214 default: \
215 BUILD_BUG(); \
216 break; \
217 } \
218 if (unlikely(__gk_err)) \
219 goto err_label; \
220 } while (0)
221
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip