[akpm-mm:mm-unstable 167/506] include/linux/hugetlb.h:1193:9: error: implicit declaration of function 'page_count' is invalid in C99

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

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-unstable
head:   ede43f2956cc25e387a5e225324104f22e715908
commit: 6c096b0425160233d2a8c3ec3f3d82dae5c37678 [167/506] mm: hugetlb: proc: check for hugetlb shared PMD in /proc/PID/smaps
config: i386-randconfig-a015 (https://download.01.org/0day-ci/archive/20230128/202301282035.M6wJfQhs-lkp@xxxxxxxxx/config)
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git/commit/?id=6c096b0425160233d2a8c3ec3f3d82dae5c37678
        git remote add akpm-mm https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git
        git fetch --no-tags akpm-mm mm-unstable
        git checkout 6c096b0425160233d2a8c3ec3f3d82dae5c37678
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/infiniband/core/ drivers/net/ethernet/mellanox/mlx5/core/ fs/cifs/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@xxxxxxxxx>

Note: the akpm-mm/mm-unstable HEAD ede43f2956cc25e387a5e225324104f22e715908 builds fine.
      It only hurts bisectability.

All errors (new ones prefixed by >>):

   In file included from drivers/infiniband/core/umem_odp.c:41:
>> include/linux/hugetlb.h:1193:9: error: implicit declaration of function 'page_count' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
           return page_count(virt_to_page(pte)) > 1;
                  ^
   In file included from drivers/infiniband/core/umem_odp.c:43:
   In file included from include/linux/hmm.h:12:
   In file included from include/linux/mm.h:25:
>> include/linux/page_ref.h:92:19: error: static declaration of 'page_count' follows non-static declaration
   static inline int page_count(const struct page *page)
                     ^
   include/linux/hugetlb.h:1193:9: note: previous implicit declaration is here
           return page_count(virt_to_page(pte)) > 1;
                  ^
   2 errors generated.


vim +/page_count +1193 include/linux/hugetlb.h

  1189	
  1190	#ifdef CONFIG_ARCH_WANT_HUGE_PMD_SHARE
  1191	static inline bool hugetlb_pmd_shared(pte_t *pte)
  1192	{
> 1193		return page_count(virt_to_page(pte)) > 1;
  1194	}
  1195	#else
  1196	static inline bool hugetlb_pmd_shared(pte_t *pte)
  1197	{
  1198		return false;
  1199	}
  1200	#endif
  1201	

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




[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