tree:
https://github.com/weiny2/linux-kernel.git lm-misc
head: 8c385a87dc5cb4d98fa417d3dd9481f3fbe4c625
commit: 9bbedda97f815fb2b6478966706968af63c983c2 [7/8] arch/kmap_atomic: Consolidate
duplicate code
config: i386-allnoconfig (attached as .config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce:
git checkout 9bbedda97f815fb2b6478966706968af63c983c2
# save the attached .config to linux build tree
make ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from arch/x86/mm/highmem_32.c:2:0:
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]
return __kmap(page);
^~~~~~
kmap
include/linux/highmem.h:40:9: warning: return makes pointer from integer without a cast
[-Wint-conversion]
return __kmap(page);
^~~~~~~~~~~~
include/linux/highmem.h: In function 'kunmap':
include/linux/highmem.h:48:3: warning: 'return' with no value, in function
returning non-void [-Wreturn-type]
return;
^~~~~~
include/linux/highmem.h:44:21: note: declared here
static inline void *kunmap(struct page *page)
^~~~~~
arch/x86/mm/highmem_32.c: In function 'kmap_atomic_prot':
> arch/x86/mm/highmem_32.c:17:24: warning: initialization makes
integer from pointer without a cast [-Wint-conversion]
unsigned long vaddr =
__kmap_atomic(page);
^~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +17 arch/x86/mm/highmem_32.c
6
7 /*
8 * kmap_atomic/kunmap_atomic is significantly faster than kmap/kunmap because
9 * no global lock is needed and because the kmap code must perform a global TLB
10 * invalidation when the kmap pool wraps.
11 *
12 * However when holding an atomic kmap it is not legal to sleep, so atomic
13 * kmaps are appropriate for short, tight code paths only.
14 */
15 void *kmap_atomic_prot(struct page *page, pgprot_t prot)
16 {
17 unsigned long vaddr = __kmap_atomic(page);
18 int idx,
type;
19
20 if (vaddr)
21 return (void *)vaddr;
22
23 type = kmap_atomic_idx_push();
24 idx = type + KM_TYPE_NR*smp_processor_id();
25 vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx);
26 BUG_ON(!pte_none(*(kmap_pte-idx)));
27 set_pte(kmap_pte-idx, mk_pte(page, prot));
28 arch_flush_lazy_mmu_mode();
29
30 return (void *)vaddr;
31 }
32 EXPORT_SYMBOL(kmap_atomic_prot);
33
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org