tree:
https://github.com/weiny2/linux-kernel.git lm-misc
head: 8c385a87dc5cb4d98fa417d3dd9481f3fbe4c625
commit: 9bbedda97f815fb2b6478966706968af63c983c2 [7/8] arch/kmap_atomic: Consolidate
duplicate code
config: sparc-defconfig (attached as .config)
compiler: sparc-linux-gcc (GCC) 9.3.0
reproduce:
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 9bbedda97f815fb2b6478966706968af63c983c2
# save the attached .config to linux build tree
GCC_VERSION=9.3.0 make.cross ARCH=sparc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from arch/sparc/mm/highmem.c:26:
include/linux/highmem.h: In function 'kmap':
include/linux/highmem.h:40:9: error: implicit declaration of function '__kmap';
did you mean 'kmap'? [-Werror=implicit-function-declaration]
40 | return __kmap(page);
| ^~~~~~
| kmap
include/linux/highmem.h:40:9: error: returning 'int' from a function with
return type 'void *' makes pointer from integer without a cast
[-Werror=int-conversion]
40 | return __kmap(page);
| ^~~~~~~~~~~~
include/linux/highmem.h: In function 'kunmap':
include/linux/highmem.h:48:3: error: 'return' with no value, in function
returning non-void [-Werror=return-type]
48 | return;
| ^~~~~~
include/linux/highmem.h:44:21: note: declared here
44 | static inline void *kunmap(struct page *page)
| ^~~~~~
arch/sparc/mm/highmem.c: In function 'kmap_atomic':
> arch/sparc/mm/highmem.c:58:24: error: initialization of 'long
unsigned int' from 'void *' makes integer from pointer without a cast
[-Werror=int-conversion]
58 | unsigned long vaddr = __kmap_atomic(page);
| ^~~~~~~~~~~~~
cc1: all warnings being treated as errors
vim +58 arch/sparc/mm/highmem.c
55
56 void *kmap_atomic(struct page *page)
57 {
58 unsigned long vaddr = __kmap_atomic(page);
59 long
idx, type;
60
61 if (vaddr)
62 return (void *)vaddr;
63
64 type = kmap_atomic_idx_push();
65 idx = type + KM_TYPE_NR*smp_processor_id();
66 vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx);
67
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org