[openeuler:OLK-6.6 3198/3198] mm/memory.c:2802:5: warning: no previous prototype for function '__remap_pfn_range'
tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 9058fc5efa4aa44340385ca69fb4ef016931af50 commit: 923e224a12462d640fa37f3069c6bfafd378ac3b [3198/3198] mm: introduce remap_pfn_range_try_pmd() for PMD-level hugepage mapping config: x86_64-allnoconfig (https://download.01.org/0day-ci/archive/20251117/202511171230.PQsrWhhz-lkp@i...) compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251117/202511171230.PQsrWhhz-lkp@i...) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp@intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202511171230.PQsrWhhz-lkp@intel.com/ All warnings (new ones prefixed by >>): In file included from mm/memory.c:68: include/linux/migrate.h:102:2: error: expected identifier or '(' 102 | { return -EINVAL; } | ^
mm/memory.c:2802:5: warning: no previous prototype for function '__remap_pfn_range' [-Wmissing-prototypes] 2802 | int __remap_pfn_range(struct vm_area_struct *vma, unsigned long addr, | ^ mm/memory.c:2802:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 2802 | int __remap_pfn_range(struct vm_area_struct *vma, unsigned long addr, | ^ | static mm/memory.c:5614:17: warning: variable 'nr_pages' set but not used [-Wunused-but-set-variable] 5614 | int flags = 0, nr_pages; | ^ 2 warnings and 1 error generated.
vim +/__remap_pfn_range +2802 mm/memory.c 2789 2790 /** 2791 * remap_pfn_range - remap kernel memory to userspace 2792 * @vma: user vma to map to 2793 * @addr: target page aligned user address to start at 2794 * @pfn: page frame number of kernel physical memory address 2795 * @size: size of mapping area 2796 * @prot: page protection flags for this mapping 2797 * 2798 * Note: this is only safe if the mm semaphore is held when called. 2799 * 2800 * Return: %0 on success, negative error code otherwise. 2801 */
2802 int __remap_pfn_range(struct vm_area_struct *vma, unsigned long addr, 2803 unsigned long pfn, unsigned long size, pgprot_t prot, 2804 unsigned int page_shift) 2805 { 2806 int err; 2807 2808 err = track_pfn_remap(vma, &prot, pfn, addr, PAGE_ALIGN(size)); 2809 if (err) 2810 return -EINVAL; 2811 2812 err = __remap_pfn_range_notrack(vma, addr, pfn, size, prot, page_shift); 2813 if (err) 2814 untrack_pfn(vma, pfn, PAGE_ALIGN(size), true); 2815 return err; 2816 } 2817
-- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
participants (1)
-
kernel test robot