[openeuler:OLK-5.10 2882/2882] mm/vmalloc.c:3632: warning: Function parameter or member 'pgoff' not described in 'remap_vmalloc_hugepage_range_partial'

tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: 0655af1b703c5ae3de3a1ba80e5e31690ccfae93 commit: a3425d4173784e41644abc3cc70d41aa2aef16fd [2882/2882] vmalloc: Extend for hugepages mapping config: x86_64-randconfig-2002-20250501 (https://download.01.org/0day-ci/archive/20250701/202507010521.S5M6UUnr-lkp@i...) compiler: clang version 20.1.2 (https://github.com/llvm/llvm-project 58df0ef89dd64126512e4ee27b4ac3fd8ddf6247) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250701/202507010521.S5M6UUnr-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/202507010521.S5M6UUnr-lkp@intel.com/ All warnings (new ones prefixed by >>):
mm/vmalloc.c:3632: warning: Function parameter or member 'pgoff' not described in 'remap_vmalloc_hugepage_range_partial' mm/vmalloc.c:3760: warning: Function parameter or member 'align' not described in 'pvm_determine_end_from_reverse'
vim +3632 mm/vmalloc.c 3612 3613 /** 3614 * remap_vmalloc_hugepage_range_partial - map vmalloc hugepages 3615 * to userspace 3616 * @vma: vma to cover 3617 * @uaddr: target user address to start at 3618 * @kaddr: virtual address of vmalloc hugepage kernel memory 3619 * @size: size of map area 3620 * 3621 * Returns: 0 for success, -Exxx on failure 3622 * 3623 * This function checks that @kaddr is a valid vmalloc'ed area, 3624 * and that it is big enough to cover the range starting at 3625 * @uaddr in @vma. Will return failure if that criteria isn't 3626 * met. 3627 * 3628 * Similar to remap_pfn_range() (see mm/memory.c) 3629 */ 3630 int remap_vmalloc_hugepage_range_partial(struct vm_area_struct *vma, unsigned long uaddr, 3631 void *kaddr, unsigned long pgoff, unsigned long size)
3632 { 3633 struct vm_struct *area; 3634 unsigned long off; 3635 unsigned long end_index; 3636 3637 if (check_shl_overflow(pgoff, PMD_SHIFT, &off)) 3638 return -EINVAL; 3639 3640 size = PMD_ALIGN(size); 3641 3642 if (!PMD_ALIGNED(uaddr) || !PMD_ALIGNED(kaddr)) 3643 return -EINVAL; 3644 3645 area = find_vm_area(kaddr); 3646 if (!area) 3647 return -EINVAL; 3648 3649 if (!(area->flags & VM_USERMAP)) 3650 return -EINVAL; 3651 3652 if (check_add_overflow(size, off, &end_index) || 3653 end_index > get_vm_area_size(area)) 3654 return -EINVAL; 3655 kaddr += off; 3656 3657 do { 3658 struct page *page = vmalloc_to_page(kaddr); 3659 int ret; 3660 3661 ret = hugetlb_insert_hugepage_pte_by_pa(vma->vm_mm, uaddr, 3662 vma->vm_page_prot, page_to_phys(page)); 3663 if (ret) 3664 return ret; 3665 3666 uaddr += PMD_SIZE; 3667 kaddr += PMD_SIZE; 3668 size -= PMD_SIZE; 3669 } while (size > 0); 3670 3671 vma->vm_flags |= VM_DONTEXPAND | VM_DONTDUMP; 3672 3673 return 0; 3674 } 3675 EXPORT_SYMBOL(remap_vmalloc_hugepage_range_partial); 3676
-- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
participants (1)
-
kernel test robot