Re: [PATCH v4] mm/filemap: change ->index to PAGE_SIZE for hugetlb pages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Sidhartha,

kernel test robot noticed the following build warnings:

[auto build test WARNING on akpm-mm/mm-everything]

url:    https://github.com/intel-lab-lkp/linux/commits/Sidhartha-Kumar/mm-filemap-change-index-to-PAGE_SIZE-for-hugetlb-pages/20230815-055236
base:   https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
patch link:    https://lore.kernel.org/r/20230814215035.222688-1-sidhartha.kumar%40oracle.com
patch subject: [PATCH v4] mm/filemap: change ->index to PAGE_SIZE for hugetlb pages
config: i386-randconfig-i005-20230815 (https://download.01.org/0day-ci/archive/20230815/202308151231.L2pfzOmu-lkp@xxxxxxxxx/config)
compiler: clang version 16.0.4 (https://github.com/llvm/llvm-project.git ae42196bc493ffe877a7e3dff8be32035dea4d07)
reproduce: (https://download.01.org/0day-ci/archive/20230815/202308151231.L2pfzOmu-lkp@xxxxxxxxx/reproduce)

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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202308151231.L2pfzOmu-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

>> mm/hugetlb.c:2116:9: warning: no previous prototype for function 'hugetlb_basepage_index' [-Wmissing-prototypes]
   pgoff_t hugetlb_basepage_index(struct page *page)
           ^
   mm/hugetlb.c:2116:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   pgoff_t hugetlb_basepage_index(struct page *page)
   ^
   static 
   include/linux/types.h:137:17: note: expanded from macro 'pgoff_t'
   #define pgoff_t unsigned long
                   ^
   1 warning generated.


vim +/hugetlb_basepage_index +2116 mm/hugetlb.c

c0d0381ade7988 Mike Kravetz       2020-04-01  2115  
fe19bd3dae3d15 Hugh Dickins       2021-06-24 @2116  pgoff_t hugetlb_basepage_index(struct page *page)
13d60f4b6ab5b7 Zhang Yi           2013-06-25  2117  {
13d60f4b6ab5b7 Zhang Yi           2013-06-25  2118  	struct page *page_head = compound_head(page);
13d60f4b6ab5b7 Zhang Yi           2013-06-25  2119  	pgoff_t index = page_index(page_head);
13d60f4b6ab5b7 Zhang Yi           2013-06-25  2120  	unsigned long compound_idx;
13d60f4b6ab5b7 Zhang Yi           2013-06-25  2121  
23baf831a32c04 Kirill A. Shutemov 2023-03-15  2122  	if (compound_order(page_head) > MAX_ORDER)
13d60f4b6ab5b7 Zhang Yi           2013-06-25  2123  		compound_idx = page_to_pfn(page) - page_to_pfn(page_head);
13d60f4b6ab5b7 Zhang Yi           2013-06-25  2124  	else
13d60f4b6ab5b7 Zhang Yi           2013-06-25  2125  		compound_idx = page - page_head;
13d60f4b6ab5b7 Zhang Yi           2013-06-25  2126  
13d60f4b6ab5b7 Zhang Yi           2013-06-25  2127  	return (index << compound_order(page_head)) + compound_idx;
13d60f4b6ab5b7 Zhang Yi           2013-06-25  2128  }
13d60f4b6ab5b7 Zhang Yi           2013-06-25  2129  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux