linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [linux-next:master 5973/6030] include/linux/page_idle.h:55:18: error: 'PAGE_EXT_YOUNG' undeclared
@ 2021-08-09  3:11 kernel test robot
  2021-08-09  8:39 ` SeongJae Park
  0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2021-08-09  3:11 UTC (permalink / raw)
  To: SeongJae Park
  Cc: kbuild-all, Linux Memory Management List, Mark Brown,
	Shakeel Butt, Fernand Sieber, Andrew Morton

[-- Attachment #1: Type: text/plain, Size: 14246 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   7999516e20bd9bb5d1f7351cbd05ca529a3a8d60
commit: 73b831d4a3c725ed2b4ee15ef9f789b97f5679eb [5973/6030] mm/idle_page_tracking: Make PG_idle reusable
config: nds32-randconfig-p001-20210809 (attached as .config)
compiler: nds32le-linux-gcc (GCC) 10.3.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
        # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=73b831d4a3c725ed2b4ee15ef9f789b97f5679eb
        git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
        git fetch --no-tags linux-next master
        git checkout 73b831d4a3c725ed2b4ee15ef9f789b97f5679eb
        # save the attached .config to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross O=build_dir ARCH=nds32 SHELL=/bin/bash

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 mm/migrate.c:47:
   include/linux/page_idle.h: In function 'page_is_young':
>> include/linux/page_idle.h:55:18: error: 'PAGE_EXT_YOUNG' undeclared (first use in this function)
      55 |  return test_bit(PAGE_EXT_YOUNG, &page_ext->flags);
         |                  ^~~~~~~~~~~~~~
   include/linux/page_idle.h:55:18: note: each undeclared identifier is reported only once for each function it appears in
>> include/linux/page_idle.h:55:43: error: invalid use of undefined type 'struct page_ext'
      55 |  return test_bit(PAGE_EXT_YOUNG, &page_ext->flags);
         |                                           ^~
   include/linux/page_idle.h: In function 'set_page_young':
   include/linux/page_idle.h:65:10: error: 'PAGE_EXT_YOUNG' undeclared (first use in this function)
      65 |  set_bit(PAGE_EXT_YOUNG, &page_ext->flags);
         |          ^~~~~~~~~~~~~~
   include/linux/page_idle.h:65:35: error: invalid use of undefined type 'struct page_ext'
      65 |  set_bit(PAGE_EXT_YOUNG, &page_ext->flags);
         |                                   ^~
   include/linux/page_idle.h: In function 'test_and_clear_page_young':
   include/linux/page_idle.h:75:28: error: 'PAGE_EXT_YOUNG' undeclared (first use in this function)
      75 |  return test_and_clear_bit(PAGE_EXT_YOUNG, &page_ext->flags);
         |                            ^~~~~~~~~~~~~~
   include/linux/page_idle.h:75:53: error: invalid use of undefined type 'struct page_ext'
      75 |  return test_and_clear_bit(PAGE_EXT_YOUNG, &page_ext->flags);
         |                                                     ^~
   include/linux/page_idle.h: In function 'page_is_idle':
>> include/linux/page_idle.h:85:18: error: 'PAGE_EXT_IDLE' undeclared (first use in this function)
      85 |  return test_bit(PAGE_EXT_IDLE, &page_ext->flags);
         |                  ^~~~~~~~~~~~~
   include/linux/page_idle.h:85:42: error: invalid use of undefined type 'struct page_ext'
      85 |  return test_bit(PAGE_EXT_IDLE, &page_ext->flags);
         |                                          ^~
   include/linux/page_idle.h: In function 'set_page_idle':
   include/linux/page_idle.h:95:10: error: 'PAGE_EXT_IDLE' undeclared (first use in this function)
      95 |  set_bit(PAGE_EXT_IDLE, &page_ext->flags);
         |          ^~~~~~~~~~~~~
   include/linux/page_idle.h:95:34: error: invalid use of undefined type 'struct page_ext'
      95 |  set_bit(PAGE_EXT_IDLE, &page_ext->flags);
         |                                  ^~
   include/linux/page_idle.h: In function 'clear_page_idle':
   include/linux/page_idle.h:105:12: error: 'PAGE_EXT_IDLE' undeclared (first use in this function)
     105 |  clear_bit(PAGE_EXT_IDLE, &page_ext->flags);
         |            ^~~~~~~~~~~~~
   include/linux/page_idle.h:105:36: error: invalid use of undefined type 'struct page_ext'
     105 |  clear_bit(PAGE_EXT_IDLE, &page_ext->flags);
         |                                    ^~
   include/linux/page_idle.h: In function 'page_is_young':
   include/linux/page_idle.h:56:1: error: control reaches end of non-void function [-Werror=return-type]
      56 | }
         | ^
   include/linux/page_idle.h: In function 'page_is_idle':
   include/linux/page_idle.h:86:1: error: control reaches end of non-void function [-Werror=return-type]
      86 | }
         | ^
   cc1: some warnings being treated as errors
--
   In file included from mm/filemap.c:44:
   include/linux/page_idle.h: In function 'page_is_young':
>> include/linux/page_idle.h:55:18: error: 'PAGE_EXT_YOUNG' undeclared (first use in this function)
      55 |  return test_bit(PAGE_EXT_YOUNG, &page_ext->flags);
         |                  ^~~~~~~~~~~~~~
   include/linux/page_idle.h:55:18: note: each undeclared identifier is reported only once for each function it appears in
>> include/linux/page_idle.h:55:43: error: invalid use of undefined type 'struct page_ext'
      55 |  return test_bit(PAGE_EXT_YOUNG, &page_ext->flags);
         |                                           ^~
   include/linux/page_idle.h: In function 'set_page_young':
   include/linux/page_idle.h:65:10: error: 'PAGE_EXT_YOUNG' undeclared (first use in this function)
      65 |  set_bit(PAGE_EXT_YOUNG, &page_ext->flags);
         |          ^~~~~~~~~~~~~~
   include/linux/page_idle.h:65:35: error: invalid use of undefined type 'struct page_ext'
      65 |  set_bit(PAGE_EXT_YOUNG, &page_ext->flags);
         |                                   ^~
   include/linux/page_idle.h: In function 'test_and_clear_page_young':
   include/linux/page_idle.h:75:28: error: 'PAGE_EXT_YOUNG' undeclared (first use in this function)
      75 |  return test_and_clear_bit(PAGE_EXT_YOUNG, &page_ext->flags);
         |                            ^~~~~~~~~~~~~~
   include/linux/page_idle.h:75:53: error: invalid use of undefined type 'struct page_ext'
      75 |  return test_and_clear_bit(PAGE_EXT_YOUNG, &page_ext->flags);
         |                                                     ^~
   include/linux/page_idle.h: In function 'page_is_idle':
>> include/linux/page_idle.h:85:18: error: 'PAGE_EXT_IDLE' undeclared (first use in this function)
      85 |  return test_bit(PAGE_EXT_IDLE, &page_ext->flags);
         |                  ^~~~~~~~~~~~~
   include/linux/page_idle.h:85:42: error: invalid use of undefined type 'struct page_ext'
      85 |  return test_bit(PAGE_EXT_IDLE, &page_ext->flags);
         |                                          ^~
   include/linux/page_idle.h: In function 'set_page_idle':
   include/linux/page_idle.h:95:10: error: 'PAGE_EXT_IDLE' undeclared (first use in this function)
      95 |  set_bit(PAGE_EXT_IDLE, &page_ext->flags);
         |          ^~~~~~~~~~~~~
   include/linux/page_idle.h:95:34: error: invalid use of undefined type 'struct page_ext'
      95 |  set_bit(PAGE_EXT_IDLE, &page_ext->flags);
         |                                  ^~
   include/linux/page_idle.h: In function 'clear_page_idle':
   include/linux/page_idle.h:105:12: error: 'PAGE_EXT_IDLE' undeclared (first use in this function)
     105 |  clear_bit(PAGE_EXT_IDLE, &page_ext->flags);
         |            ^~~~~~~~~~~~~
   include/linux/page_idle.h:105:36: error: invalid use of undefined type 'struct page_ext'
     105 |  clear_bit(PAGE_EXT_IDLE, &page_ext->flags);
         |                                    ^~
   include/linux/page_idle.h: In function 'page_is_idle':
   include/linux/page_idle.h:86:1: error: control reaches end of non-void function [-Werror=return-type]
      86 | }
         | ^
   cc1: some warnings being treated as errors
--
   In file included from mm/rmap.c:72:
   include/linux/page_idle.h: In function 'page_is_young':
>> include/linux/page_idle.h:55:18: error: 'PAGE_EXT_YOUNG' undeclared (first use in this function)
      55 |  return test_bit(PAGE_EXT_YOUNG, &page_ext->flags);
         |                  ^~~~~~~~~~~~~~
   include/linux/page_idle.h:55:18: note: each undeclared identifier is reported only once for each function it appears in
>> include/linux/page_idle.h:55:43: error: invalid use of undefined type 'struct page_ext'
      55 |  return test_bit(PAGE_EXT_YOUNG, &page_ext->flags);
         |                                           ^~
   include/linux/page_idle.h: In function 'set_page_young':
   include/linux/page_idle.h:65:10: error: 'PAGE_EXT_YOUNG' undeclared (first use in this function)
      65 |  set_bit(PAGE_EXT_YOUNG, &page_ext->flags);
         |          ^~~~~~~~~~~~~~
   include/linux/page_idle.h:65:35: error: invalid use of undefined type 'struct page_ext'
      65 |  set_bit(PAGE_EXT_YOUNG, &page_ext->flags);
         |                                   ^~
   include/linux/page_idle.h: In function 'test_and_clear_page_young':
   include/linux/page_idle.h:75:28: error: 'PAGE_EXT_YOUNG' undeclared (first use in this function)
      75 |  return test_and_clear_bit(PAGE_EXT_YOUNG, &page_ext->flags);
         |                            ^~~~~~~~~~~~~~
   include/linux/page_idle.h:75:53: error: invalid use of undefined type 'struct page_ext'
      75 |  return test_and_clear_bit(PAGE_EXT_YOUNG, &page_ext->flags);
         |                                                     ^~
   include/linux/page_idle.h: In function 'page_is_idle':
>> include/linux/page_idle.h:85:18: error: 'PAGE_EXT_IDLE' undeclared (first use in this function)
      85 |  return test_bit(PAGE_EXT_IDLE, &page_ext->flags);
         |                  ^~~~~~~~~~~~~
   include/linux/page_idle.h:85:42: error: invalid use of undefined type 'struct page_ext'
      85 |  return test_bit(PAGE_EXT_IDLE, &page_ext->flags);
         |                                          ^~
   include/linux/page_idle.h: In function 'set_page_idle':
   include/linux/page_idle.h:95:10: error: 'PAGE_EXT_IDLE' undeclared (first use in this function)
      95 |  set_bit(PAGE_EXT_IDLE, &page_ext->flags);
         |          ^~~~~~~~~~~~~
   include/linux/page_idle.h:95:34: error: invalid use of undefined type 'struct page_ext'
      95 |  set_bit(PAGE_EXT_IDLE, &page_ext->flags);
         |                                  ^~
   include/linux/page_idle.h: In function 'clear_page_idle':
   include/linux/page_idle.h:105:12: error: 'PAGE_EXT_IDLE' undeclared (first use in this function)
     105 |  clear_bit(PAGE_EXT_IDLE, &page_ext->flags);
         |            ^~~~~~~~~~~~~
   include/linux/page_idle.h:105:36: error: invalid use of undefined type 'struct page_ext'
     105 |  clear_bit(PAGE_EXT_IDLE, &page_ext->flags);
         |                                    ^~
   include/linux/page_idle.h: In function 'test_and_clear_page_young':
   include/linux/page_idle.h:76:1: error: control reaches end of non-void function [-Werror=return-type]
      76 | }
         | ^
   cc1: some warnings being treated as errors


vim +/PAGE_EXT_YOUNG +55 include/linux/page_idle.h

33c3fc71c8cfa3 Vladimir Davydov 2015-09-09  47  
33c3fc71c8cfa3 Vladimir Davydov 2015-09-09  48  static inline bool page_is_young(struct page *page)
33c3fc71c8cfa3 Vladimir Davydov 2015-09-09  49  {
f86e4271978bd9 Yang Shi         2016-06-03  50  	struct page_ext *page_ext = lookup_page_ext(page);
f86e4271978bd9 Yang Shi         2016-06-03  51  
f86e4271978bd9 Yang Shi         2016-06-03  52  	if (unlikely(!page_ext))
f86e4271978bd9 Yang Shi         2016-06-03  53  		return false;
f86e4271978bd9 Yang Shi         2016-06-03  54  
f86e4271978bd9 Yang Shi         2016-06-03 @55  	return test_bit(PAGE_EXT_YOUNG, &page_ext->flags);
33c3fc71c8cfa3 Vladimir Davydov 2015-09-09  56  }
33c3fc71c8cfa3 Vladimir Davydov 2015-09-09  57  
33c3fc71c8cfa3 Vladimir Davydov 2015-09-09  58  static inline void set_page_young(struct page *page)
33c3fc71c8cfa3 Vladimir Davydov 2015-09-09  59  {
f86e4271978bd9 Yang Shi         2016-06-03  60  	struct page_ext *page_ext = lookup_page_ext(page);
f86e4271978bd9 Yang Shi         2016-06-03  61  
f86e4271978bd9 Yang Shi         2016-06-03  62  	if (unlikely(!page_ext))
f86e4271978bd9 Yang Shi         2016-06-03  63  		return;
f86e4271978bd9 Yang Shi         2016-06-03  64  
f86e4271978bd9 Yang Shi         2016-06-03  65  	set_bit(PAGE_EXT_YOUNG, &page_ext->flags);
33c3fc71c8cfa3 Vladimir Davydov 2015-09-09  66  }
33c3fc71c8cfa3 Vladimir Davydov 2015-09-09  67  
33c3fc71c8cfa3 Vladimir Davydov 2015-09-09  68  static inline bool test_and_clear_page_young(struct page *page)
33c3fc71c8cfa3 Vladimir Davydov 2015-09-09  69  {
f86e4271978bd9 Yang Shi         2016-06-03  70  	struct page_ext *page_ext = lookup_page_ext(page);
f86e4271978bd9 Yang Shi         2016-06-03  71  
f86e4271978bd9 Yang Shi         2016-06-03  72  	if (unlikely(!page_ext))
f86e4271978bd9 Yang Shi         2016-06-03  73  		return false;
f86e4271978bd9 Yang Shi         2016-06-03  74  
f86e4271978bd9 Yang Shi         2016-06-03 @75  	return test_and_clear_bit(PAGE_EXT_YOUNG, &page_ext->flags);
33c3fc71c8cfa3 Vladimir Davydov 2015-09-09  76  }
33c3fc71c8cfa3 Vladimir Davydov 2015-09-09  77  
33c3fc71c8cfa3 Vladimir Davydov 2015-09-09  78  static inline bool page_is_idle(struct page *page)
33c3fc71c8cfa3 Vladimir Davydov 2015-09-09  79  {
f86e4271978bd9 Yang Shi         2016-06-03  80  	struct page_ext *page_ext = lookup_page_ext(page);
f86e4271978bd9 Yang Shi         2016-06-03  81  
f86e4271978bd9 Yang Shi         2016-06-03  82  	if (unlikely(!page_ext))
f86e4271978bd9 Yang Shi         2016-06-03  83  		return false;
f86e4271978bd9 Yang Shi         2016-06-03  84  
f86e4271978bd9 Yang Shi         2016-06-03 @85  	return test_bit(PAGE_EXT_IDLE, &page_ext->flags);
33c3fc71c8cfa3 Vladimir Davydov 2015-09-09  86  }
33c3fc71c8cfa3 Vladimir Davydov 2015-09-09  87  

:::::: The code at line 55 was first introduced by commit
:::::: f86e4271978bd93db466d6a95dad4b0fdcdb04f6 mm: check the return value of lookup_page_ext for all call sites

:::::: TO: Yang Shi <yang.shi@linaro.org>
:::::: 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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 23447 bytes --]

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

* Re: [linux-next:master 5973/6030] include/linux/page_idle.h:55:18: error: 'PAGE_EXT_YOUNG' undeclared
  2021-08-09  3:11 [linux-next:master 5973/6030] include/linux/page_idle.h:55:18: error: 'PAGE_EXT_YOUNG' undeclared kernel test robot
@ 2021-08-09  8:39 ` SeongJae Park
  0 siblings, 0 replies; 2+ messages in thread
From: SeongJae Park @ 2021-08-09  8:39 UTC (permalink / raw)
  To: kernel test robot
  Cc: SeongJae Park, kbuild-all, Linux Memory Management List,
	Mark Brown, Shakeel Butt, Fernand Sieber, Andrew Morton

From: SeongJae Park <sjpark@amazon.de>

Hello Robot,

On Mon, 9 Aug 2021 11:11:33 +0800 kernel test robot <lkp@intel.com> wrote:

> 
> [-- Attachment #1: Type: text/plain, Size: 14246 bytes --]
> 
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> head:   7999516e20bd9bb5d1f7351cbd05ca529a3a8d60
> commit: 73b831d4a3c725ed2b4ee15ef9f789b97f5679eb [5973/6030] mm/idle_page_tracking: Make PG_idle reusable
> config: nds32-randconfig-p001-20210809 (attached as .config)
> compiler: nds32le-linux-gcc (GCC) 10.3.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
>         # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=73b831d4a3c725ed2b4ee15ef9f789b97f5679eb
>         git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
>         git fetch --no-tags linux-next master
>         git checkout 73b831d4a3c725ed2b4ee15ef9f789b97f5679eb
>         # save the attached .config to linux build tree
>         mkdir build_dir
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross O=build_dir ARCH=nds32 SHELL=/bin/bash
> 
> 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 mm/migrate.c:47:
>    include/linux/page_idle.h: In function 'page_is_young':
> >> include/linux/page_idle.h:55:18: error: 'PAGE_EXT_YOUNG' undeclared (first use in this function)
>       55 |  return test_bit(PAGE_EXT_YOUNG, &page_ext->flags);
>          |                  ^~~~~~~~~~~~~~

Thank you for the report!

Similar issue was reported a few days ago and I made a fix:
https://lore.kernel.org/linux-fsdevel/20210806095153.6444-1-sj38.park@gmail.com/

With your reproducer, I also confirmed the patch fixes the issue.


Thanks,
SeongJae Park

[...]


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

end of thread, other threads:[~2021-08-09  8:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-09  3:11 [linux-next:master 5973/6030] include/linux/page_idle.h:55:18: error: 'PAGE_EXT_YOUNG' undeclared kernel test robot
2021-08-09  8:39 ` SeongJae Park

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).