public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [willy-pagecache:for-next 13/75] include/linux/mm.h:1570:29: error: conflicting types for 'page_to_section'; have 'long unsigned int(const struct page *)'
@ 2022-02-04 22:54 kernel test robot
  2022-02-05  1:08 ` Matthew Wilcox
  0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2022-02-04 22:54 UTC (permalink / raw)
  To: Matthew Wilcox (Oracle)
  Cc: kbuild-all, linux-kernel, Christoph Hellwig, John Hubbard,
	Jason Gunthorpe, William Kucharski

tree:   git://git.infradead.org/users/willy/pagecache for-next
head:   0416a53bea174a256c555e1662abb917077a528c
commit: 8788d4b404865697ebe822cff65a1380728ba251 [13/75] mm: Add folio_pincount_ptr()
config: alpha-allmodconfig (https://download.01.org/0day-ci/archive/20220205/202202050617.Ew48ldTc-lkp@intel.com/config)
compiler: alpha-linux-gcc (GCC) 11.2.0
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
        git remote add willy-pagecache git://git.infradead.org/users/willy/pagecache
        git fetch --no-tags willy-pagecache for-next
        git checkout 8788d4b404865697ebe822cff65a1380728ba251
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=alpha prepare

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   In file included from arch/alpha/include/asm/page.h:94,
                    from include/linux/shm.h:6,
                    from include/linux/sched.h:16,
                    from arch/alpha/kernel/asm-offsets.c:10:
   include/linux/mm.h: In function 'folio_pincount_ptr':
   include/asm-generic/memory_model.h:35:21: error: implicit declaration of function 'page_to_section'; did you mean 'present_section'? [-Werror=implicit-function-declaration]
      35 |         int __sec = page_to_section(__pg);                      \
         |                     ^~~~~~~~~~~~~~~
   include/asm-generic/memory_model.h:40:32: note: in definition of macro '__pfn_to_page'
      40 | ({      unsigned long __pfn = (pfn);                    \
         |                                ^~~
   include/asm-generic/memory_model.h:52:21: note: in expansion of macro '__page_to_pfn'
      52 | #define page_to_pfn __page_to_pfn
         |                     ^~~~~~~~~~~~~
   include/linux/mm.h:218:38: note: in expansion of macro 'page_to_pfn'
     218 | #define nth_page(page,n) pfn_to_page(page_to_pfn((page)) + (n))
         |                                      ^~~~~~~~~~~
   include/linux/page-flags.h:230:33: note: in expansion of macro 'nth_page'
     230 | #define folio_page(folio, n)    nth_page(&(folio)->page, n)
         |                                 ^~~~~~~~
   include/linux/mm.h:896:17: note: in expansion of macro 'folio_page'
     896 |         return &folio_page(folio, 1)->compound_pincount;
         |                 ^~~~~~~~~~
   In file included from include/linux/pid_namespace.h:7,
                    from include/linux/ptrace.h:10,
                    from arch/alpha/kernel/asm-offsets.c:11:
   include/linux/mm.h: At top level:
>> include/linux/mm.h:1570:29: error: conflicting types for 'page_to_section'; have 'long unsigned int(const struct page *)'
    1570 | static inline unsigned long page_to_section(const struct page *page)
         |                             ^~~~~~~~~~~~~~~
   In file included from arch/alpha/include/asm/page.h:94,
                    from include/linux/shm.h:6,
                    from include/linux/sched.h:16,
                    from arch/alpha/kernel/asm-offsets.c:10:
   include/asm-generic/memory_model.h:35:21: note: previous implicit declaration of 'page_to_section' with type 'int()'
      35 |         int __sec = page_to_section(__pg);                      \
         |                     ^~~~~~~~~~~~~~~
   include/asm-generic/memory_model.h:40:32: note: in definition of macro '__pfn_to_page'
      40 | ({      unsigned long __pfn = (pfn);                    \
         |                                ^~~
   include/asm-generic/memory_model.h:52:21: note: in expansion of macro '__page_to_pfn'
      52 | #define page_to_pfn __page_to_pfn
         |                     ^~~~~~~~~~~~~
   include/linux/mm.h:218:38: note: in expansion of macro 'page_to_pfn'
     218 | #define nth_page(page,n) pfn_to_page(page_to_pfn((page)) + (n))
         |                                      ^~~~~~~~~~~
   include/linux/page-flags.h:230:33: note: in expansion of macro 'nth_page'
     230 | #define folio_page(folio, n)    nth_page(&(folio)->page, n)
         |                                 ^~~~~~~~
   include/linux/mm.h:896:17: note: in expansion of macro 'folio_page'
     896 |         return &folio_page(folio, 1)->compound_pincount;
         |                 ^~~~~~~~~~
   arch/alpha/kernel/asm-offsets.c:15:6: warning: no previous prototype for 'foo' [-Wmissing-prototypes]
      15 | void foo(void)
         |      ^~~
   cc1: some warnings being treated as errors
   make[2]: *** [scripts/Makefile.build:121: arch/alpha/kernel/asm-offsets.s] Error 1
   make[2]: Target '__build' not remade because of errors.
   make[1]: *** [Makefile:1191: prepare0] Error 2
   make[1]: Target 'prepare' not remade because of errors.
   make: *** [Makefile:219: __sub-make] Error 2
   make: Target 'prepare' not remade because of errors.


vim +1570 include/linux/mm.h

bf4e8902ee5080 Daniel Kiper      2011-05-24  1569  
aa462abe8aaf21 Ian Campbell      2011-08-17 @1570  static inline unsigned long page_to_section(const struct page *page)
d41dee369bff3b Andy Whitcroft    2005-06-23  1571  {
d41dee369bff3b Andy Whitcroft    2005-06-23  1572  	return (page->flags >> SECTIONS_PGSHIFT) & SECTIONS_MASK;
d41dee369bff3b Andy Whitcroft    2005-06-23  1573  }
308c05e35e3517 Christoph Lameter 2008-04-28  1574  #endif
d41dee369bff3b Andy Whitcroft    2005-06-23  1575  

:::::: The code at line 1570 was first introduced by commit
:::::: aa462abe8aaf2198d6aef97da20c874ac694a39f mm: fix __page_to_pfn for a const struct page argument

:::::: TO: Ian Campbell <ian.campbell@citrix.com>
:::::: CC: Linus Torvalds <torvalds@linux-foundation.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [willy-pagecache:for-next 13/75] include/linux/mm.h:1570:29: error: conflicting types for 'page_to_section'; have 'long unsigned int(const struct page *)'
  2022-02-04 22:54 [willy-pagecache:for-next 13/75] include/linux/mm.h:1570:29: error: conflicting types for 'page_to_section'; have 'long unsigned int(const struct page *)' kernel test robot
@ 2022-02-05  1:08 ` Matthew Wilcox
  0 siblings, 0 replies; 2+ messages in thread
From: Matthew Wilcox @ 2022-02-05  1:08 UTC (permalink / raw)
  To: kernel test robot
  Cc: kbuild-all, linux-kernel, Christoph Hellwig, John Hubbard,
	Jason Gunthorpe, William Kucharski, linux-mm

On Sat, Feb 05, 2022 at 06:54:20AM +0800, kernel test robot wrote:
> commit: 8788d4b404865697ebe822cff65a1380728ba251 [13/75] mm: Add folio_pincount_ptr()
>    include/linux/mm.h: In function 'folio_pincount_ptr':
>    include/asm-generic/memory_model.h:35:21: error: implicit declaration of function 'page_to_section'; did you mean 'present_section'? [-Werror=implicit-function-declaration]

Grr.  I can't use folio_page() until after page_to_section().  So I've
moved a lot of code around in patches 13 and 14.  New version pushed to
infradead.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-02-05  1:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-04 22:54 [willy-pagecache:for-next 13/75] include/linux/mm.h:1570:29: error: conflicting types for 'page_to_section'; have 'long unsigned int(const struct page *)' kernel test robot
2022-02-05  1:08 ` Matthew Wilcox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox