[jlayton:netfs-linked-list 26/54] include/linux/page-flags.h:788:27: error: passing argument 1 of 'dump_page' discards 'const' qualifier from pointer target type
From: kernel test robot
Date: Tue Jun 28 2022 - 18:28:47 EST
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux.git netfs-linked-list
head: d35a2461e039c9131e97bb125eac59a0f04e9161
commit: 06b03c53376206f3b98cc4dbb1f061a10085309b [26/54] mm: Make some folio function arguments const
config: i386-allyesconfig (https://download.01.org/0day-ci/archive/20220629/202206290625.KP0q3MpI-lkp@xxxxxxxxx/config)
compiler: gcc-11 (Debian 11.3.0-3) 11.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux.git/commit/?id=06b03c53376206f3b98cc4dbb1f061a10085309b
git remote add jlayton https://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux.git
git fetch --no-tags jlayton netfs-linked-list
git checkout 06b03c53376206f3b98cc4dbb1f061a10085309b
# save the config file
mkdir build_dir && cp config build_dir/.config
make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash lib/
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@xxxxxxxxx>
All errors (new ones prefixed by >>):
In file included from include/linux/gfp.h:5,
from include/linux/umh.h:4,
from include/linux/kmod.h:9,
from include/linux/module.h:17,
from lib/test_bitops.c:9:
include/linux/page-flags.h: In function 'PageHead':
>> include/linux/page-flags.h:788:27: error: passing argument 1 of 'dump_page' discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
788 | PF_POISONED_CHECK(page);
| ^~~~
include/linux/mmdebug.h:21:35: note: in definition of macro 'VM_BUG_ON_PAGE'
21 | dump_page(page, "VM_BUG_ON_PAGE(" __stringify(cond)")");\
| ^~~~
include/linux/page-flags.h:370:17: note: in expansion of macro 'VM_BUG_ON_PGFLAGS'
370 | VM_BUG_ON_PGFLAGS(PagePoisoned(page), page); \
| ^~~~~~~~~~~~~~~~~
include/linux/page-flags.h:788:9: note: in expansion of macro 'PF_POISONED_CHECK'
788 | PF_POISONED_CHECK(page);
| ^~~~~~~~~~~~~~~~~
include/linux/mmdebug.h:12:29: note: expected 'struct page *' but argument is of type 'const struct page *'
12 | void dump_page(struct page *page, const char *reason);
| ~~~~~~~~~~~~~^~~~
cc1: all warnings being treated as errors
vim +788 include/linux/page-flags.h
e7d324850bfcb3 Muchun Song 2022-03-22 785
06b03c53376206 David Howells 2022-06-08 786 static __always_inline int PageHead(const struct page *page)
e7d324850bfcb3 Muchun Song 2022-03-22 787 {
e7d324850bfcb3 Muchun Song 2022-03-22 @788 PF_POISONED_CHECK(page);
e7d324850bfcb3 Muchun Song 2022-03-22 789 return test_bit(PG_head, &page->flags) && !page_is_fake_head(page);
e7d324850bfcb3 Muchun Song 2022-03-22 790 }
e7d324850bfcb3 Muchun Song 2022-03-22 791
:::::: The code at line 788 was first introduced by commit
:::::: e7d324850bfcb30df563d144c0363cc44595277d mm: hugetlb: free the 2nd vmemmap page associated with each HugeTLB page
:::::: TO: Muchun Song <songmuchun@xxxxxxxxxxxxx>
:::::: CC: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
--
0-DAY CI Kernel Test Service
https://01.org/lkp