* [akpm-mm:mm-unstable 167/506] include/linux/hugetlb.h:1193:9: error: implicit declaration of function 'page_count' is invalid in C99
@ 2023-01-28 12:55 kernel test robot
2023-01-29 21:11 ` Andrew Morton
0 siblings, 1 reply; 3+ messages in thread
From: kernel test robot @ 2023-01-28 12:55 UTC (permalink / raw)
To: Mike Kravetz
Cc: llvm, oe-kbuild-all, Andrew Morton, Linux Memory Management List
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@intel.com/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@intel.com>
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
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [akpm-mm:mm-unstable 167/506] include/linux/hugetlb.h:1193:9: error: implicit declaration of function 'page_count' is invalid in C99
2023-01-28 12:55 [akpm-mm:mm-unstable 167/506] include/linux/hugetlb.h:1193:9: error: implicit declaration of function 'page_count' is invalid in C99 kernel test robot
@ 2023-01-29 21:11 ` Andrew Morton
2023-01-29 23:53 ` Mike Kravetz
0 siblings, 1 reply; 3+ messages in thread
From: Andrew Morton @ 2023-01-29 21:11 UTC (permalink / raw)
To: kernel test robot
Cc: Mike Kravetz, llvm, oe-kbuild-all, Linux Memory Management List
On Sat, 28 Jan 2023 20:55:08 +0800 kernel test robot <lkp@intel.com> wrote:
> 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@intel.com/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@intel.com>
>
> 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;
> ^
Thanks.
I hesitate to include mm.h into hugetlb.h, but page_ref.h looks OK.
--- a/include/linux/hugetlb.h~mm-hugetlb-proc-check-for-hugetlb-shared-pmd-in-proc-pid-smaps-fix-2
+++ a/include/linux/hugetlb.h
@@ -7,6 +7,7 @@
#include <linux/fs.h>
#include <linux/hugetlb_inline.h>
#include <linux/cgroup.h>
+#include <linux/page_ref.h>
#include <linux/list.h>
#include <linux/kref.h>
#include <linux/pgtable.h>
_
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [akpm-mm:mm-unstable 167/506] include/linux/hugetlb.h:1193:9: error: implicit declaration of function 'page_count' is invalid in C99
2023-01-29 21:11 ` Andrew Morton
@ 2023-01-29 23:53 ` Mike Kravetz
0 siblings, 0 replies; 3+ messages in thread
From: Mike Kravetz @ 2023-01-29 23:53 UTC (permalink / raw)
To: Andrew Morton
Cc: kernel test robot, llvm, oe-kbuild-all, Linux Memory Management List
On 01/29/23 13:11, Andrew Morton wrote:
> On Sat, 28 Jan 2023 20:55:08 +0800 kernel test robot <lkp@intel.com> wrote:
>
> > 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@intel.com/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@intel.com>
> >
> > 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;
> > ^
>
> Thanks.
>
> I hesitate to include mm.h into hugetlb.h, but page_ref.h looks OK.
>
I was a bit confused because linux/hugetlb.h already includes linux/mm.h
which includes linux/page_ref.h. Have not yet looked into this more closely.
--
Mike Kravetz
> --- a/include/linux/hugetlb.h~mm-hugetlb-proc-check-for-hugetlb-shared-pmd-in-proc-pid-smaps-fix-2
> +++ a/include/linux/hugetlb.h
> @@ -7,6 +7,7 @@
> #include <linux/fs.h>
> #include <linux/hugetlb_inline.h>
> #include <linux/cgroup.h>
> +#include <linux/page_ref.h>
> #include <linux/list.h>
> #include <linux/kref.h>
> #include <linux/pgtable.h>
> _
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-01-29 23:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-28 12:55 [akpm-mm:mm-unstable 167/506] include/linux/hugetlb.h:1193:9: error: implicit declaration of function 'page_count' is invalid in C99 kernel test robot
2023-01-29 21:11 ` Andrew Morton
2023-01-29 23:53 ` Mike Kravetz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox