Re: [PATCH v13 15/18] mm/memcg: Add folio_lruvec()

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

 



Hi "Matthew,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v5.14-rc1 next-20210712]
[cannot apply to hnaz-linux-mm/master tip/perf/core linux/master]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Matthew-Wilcox-Oracle/Convert-memcg-to-folios/20210713-035650
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git e73f0f0ee7541171d89f2e2491130c7771ba58d3
config: i386-randconfig-p002-20210712 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
        # https://github.com/0day-ci/linux/commit/01c63778e430697015122448ac6344d1dc2f10e4
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Matthew-Wilcox-Oracle/Convert-memcg-to-folios/20210713-035650
        git checkout 01c63778e430697015122448ac6344d1dc2f10e4
        # save the attached .config to linux build tree
        make W=1 ARCH=i386 

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

All errors (new ones prefixed by >>):

         |                  ^~~~~~~~~~
   include/linux/memcontrol.h: At top level:
   include/linux/memcontrol.h:420:55: warning: 'struct folio' declared inside parameter list will not be visible outside of this definition or declaration
     420 | static inline struct obj_cgroup *__folio_objcg(struct folio *folio)
         |                                                       ^~~~~
   include/linux/memcontrol.h: In function '__folio_objcg':
   include/linux/memcontrol.h:422:34: error: dereferencing pointer to incomplete type 'struct folio'
     422 |  unsigned long memcg_data = folio->memcg_data;
         |                                  ^~
   include/linux/memcontrol.h: At top level:
   include/linux/memcontrol.h:451:53: warning: 'struct folio' declared inside parameter list will not be visible outside of this definition or declaration
     451 | static inline struct mem_cgroup *folio_memcg(struct folio *folio)
         |                                                     ^~~~~
   include/linux/memcontrol.h: In function 'folio_memcg':
   include/linux/memcontrol.h:453:23: error: passing argument 1 of 'folio_memcg_kmem' from incompatible pointer type [-Werror=incompatible-pointer-types]
     453 |  if (folio_memcg_kmem(folio))
         |                       ^~~~~
         |                       |
         |                       struct folio *
   include/linux/memcontrol.h:375:51: note: expected 'struct folio *' but argument is of type 'struct folio *'
     375 | static inline bool folio_memcg_kmem(struct folio *folio);
         |                                     ~~~~~~~~~~~~~~^~~~~
   include/linux/memcontrol.h:454:41: error: passing argument 1 of '__folio_objcg' from incompatible pointer type [-Werror=incompatible-pointer-types]
     454 |   return obj_cgroup_memcg(__folio_objcg(folio));
         |                                         ^~~~~
         |                                         |
         |                                         struct folio *
   include/linux/memcontrol.h:420:62: note: expected 'struct folio *' but argument is of type 'struct folio *'
     420 | static inline struct obj_cgroup *__folio_objcg(struct folio *folio)
         |                                                ~~~~~~~~~~~~~~^~~~~
   include/linux/memcontrol.h:455:23: error: passing argument 1 of '__folio_memcg' from incompatible pointer type [-Werror=incompatible-pointer-types]
     455 |  return __folio_memcg(folio);
         |                       ^~~~~
         |                       |
         |                       struct folio *
   include/linux/memcontrol.h:399:62: note: expected 'struct folio *' but argument is of type 'struct folio *'
     399 | static inline struct mem_cgroup *__folio_memcg(struct folio *folio)
         |                                                ~~~~~~~~~~~~~~^~~~~
   include/linux/memcontrol.h: In function 'page_memcg':
   include/linux/memcontrol.h:460:21: error: implicit declaration of function 'page_folio' [-Werror=implicit-function-declaration]
     460 |  return folio_memcg(page_folio(page));
         |                     ^~~~~~~~~~
   include/linux/memcontrol.h:460:21: warning: passing argument 1 of 'folio_memcg' makes pointer from integer without a cast [-Wint-conversion]
     460 |  return folio_memcg(page_folio(page));
         |                     ^~~~~~~~~~~~~~~~
         |                     |
         |                     int
   include/linux/memcontrol.h:451:60: note: expected 'struct folio *' but argument is of type 'int'
     451 | static inline struct mem_cgroup *folio_memcg(struct folio *folio)
         |                                              ~~~~~~~~~~~~~~^~~~~
   include/linux/memcontrol.h: At top level:
   include/linux/memcontrol.h:540:44: warning: 'struct folio' declared inside parameter list will not be visible outside of this definition or declaration
     540 | static inline bool folio_memcg_kmem(struct folio *folio)
         |                                            ^~~~~
   include/linux/memcontrol.h:540:20: error: conflicting types for 'folio_memcg_kmem'
     540 | static inline bool folio_memcg_kmem(struct folio *folio)
         |                    ^~~~~~~~~~~~~~~~
   include/linux/memcontrol.h:375:20: note: previous declaration of 'folio_memcg_kmem' was here
     375 | static inline bool folio_memcg_kmem(struct folio *folio);
         |                    ^~~~~~~~~~~~~~~~
   In file included from include/asm-generic/atomic-instrumented.h:20,
                    from include/linux/atomic.h:81,
                    from include/linux/crypto.h:15,
                    from arch/x86/kernel/asm-offsets.c:9:
   include/linux/memcontrol.h: In function 'folio_memcg_kmem':
   include/linux/memcontrol.h:542:35: error: dereferencing pointer to incomplete type 'struct folio'
     542 |  VM_BUG_ON_PGFLAGS(PageTail(&folio->page), &folio->page);
         |                                   ^~
   include/linux/build_bug.h:30:63: note: in definition of macro 'BUILD_BUG_ON_INVALID'
      30 | #define BUILD_BUG_ON_INVALID(e) ((void)(sizeof((__force long)(e))))
         |                                                               ^
   include/linux/memcontrol.h:542:2: note: in expansion of macro 'VM_BUG_ON_PGFLAGS'
     542 |  VM_BUG_ON_PGFLAGS(PageTail(&folio->page), &folio->page);
         |  ^~~~~~~~~~~~~~~~~
   In file included from include/linux/swap.h:9,
                    from include/linux/suspend.h:5,
                    from arch/x86/kernel/asm-offsets.c:13:
   include/linux/memcontrol.h: In function 'PageMemcgKmem':
   include/linux/memcontrol.h:606:26: warning: passing argument 1 of 'folio_memcg_kmem' makes pointer from integer without a cast [-Wint-conversion]
     606 |  return folio_memcg_kmem(page_folio(page));
         |                          ^~~~~~~~~~~~~~~~
         |                          |
         |                          int
   include/linux/memcontrol.h:540:51: note: expected 'struct folio *' but argument is of type 'int'
     540 | static inline bool folio_memcg_kmem(struct folio *folio)
         |                                     ~~~~~~~~~~~~~~^~~~~
   include/linux/memcontrol.h: At top level:
   include/linux/memcontrol.h:707:30: warning: 'struct folio' declared inside parameter list will not be visible outside of this definition or declaration
     707 | int mem_cgroup_charge(struct folio *, struct mm_struct *, gfp_t);
         |                              ^~~~~
   include/linux/memcontrol.h:712:33: warning: 'struct folio' declared inside parameter list will not be visible outside of this definition or declaration
     712 | void mem_cgroup_uncharge(struct folio *folio);
         |                                 ^~~~~
   include/linux/memcontrol.h:715:32: warning: 'struct folio' declared inside parameter list will not be visible outside of this definition or declaration
     715 | void mem_cgroup_migrate(struct folio *old, struct folio *new);
         |                                ^~~~~
   include/linux/memcontrol.h:759:50: warning: 'struct folio' declared inside parameter list will not be visible outside of this definition or declaration
     759 | static inline struct lruvec *folio_lruvec(struct folio *folio)
         |                                                  ^~~~~
   include/linux/memcontrol.h: In function 'folio_lruvec':
>> include/linux/memcontrol.h:761:41: error: passing argument 1 of 'folio_memcg' from incompatible pointer type [-Werror=incompatible-pointer-types]
     761 |  struct mem_cgroup *memcg = folio_memcg(folio);
         |                                         ^~~~~
         |                                         |
         |                                         struct folio *
   include/linux/memcontrol.h:451:60: note: expected 'struct folio *' but argument is of type 'struct folio *'
     451 | static inline struct mem_cgroup *folio_memcg(struct folio *folio)
         |                                              ~~~~~~~~~~~~~~^~~~~
>> include/linux/memcontrol.h:763:2: error: implicit declaration of function 'VM_WARN_ON_ONCE_FOLIO'; did you mean 'VM_WARN_ON_ONCE_PAGE'? [-Werror=implicit-function-declaration]
     763 |  VM_WARN_ON_ONCE_FOLIO(!memcg && !mem_cgroup_disabled(), folio);
         |  ^~~~~~~~~~~~~~~~~~~~~
         |  VM_WARN_ON_ONCE_PAGE
>> include/linux/memcontrol.h:764:34: error: implicit declaration of function 'folio_pgdat'; did you mean 'folio_nid'? [-Werror=implicit-function-declaration]
     764 |  return mem_cgroup_lruvec(memcg, folio_pgdat(folio));
         |                                  ^~~~~~~~~~~
         |                                  folio_nid
   include/linux/memcontrol.h:764:34: warning: passing argument 2 of 'mem_cgroup_lruvec' makes pointer from integer without a cast [-Wint-conversion]
     764 |  return mem_cgroup_lruvec(memcg, folio_pgdat(folio));
         |                                  ^~~~~~~~~~~~~~~~~~
         |                                  |
         |                                  int
   include/linux/memcontrol.h:727:33: note: expected 'struct pglist_data *' but argument is of type 'int'
     727 |             struct pglist_data *pgdat)
         |             ~~~~~~~~~~~~~~~~~~~~^~~~~
   include/linux/memcontrol.h: At top level:
   include/linux/memcontrol.h:952:30: warning: 'struct folio' declared inside parameter list will not be visible outside of this definition or declaration
     952 | void folio_memcg_lock(struct folio *folio);
         |                              ^~~~~
   include/linux/memcontrol.h:953:32: warning: 'struct folio' declared inside parameter list will not be visible outside of this definition or declaration
     953 | void folio_memcg_unlock(struct folio *folio);
         |                                ^~~~~
   include/linux/memcontrol.h:375:20: warning: 'folio_memcg_kmem' used but never defined
     375 | static inline bool folio_memcg_kmem(struct folio *folio);
         |                    ^~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors
--
         |                  ^~~~~~~~~~
   include/linux/memcontrol.h: At top level:
   include/linux/memcontrol.h:420:55: warning: 'struct folio' declared inside parameter list will not be visible outside of this definition or declaration
     420 | static inline struct obj_cgroup *__folio_objcg(struct folio *folio)
         |                                                       ^~~~~
   include/linux/memcontrol.h: In function '__folio_objcg':
   include/linux/memcontrol.h:422:34: error: dereferencing pointer to incomplete type 'struct folio'
     422 |  unsigned long memcg_data = folio->memcg_data;
         |                                  ^~
   include/linux/memcontrol.h: At top level:
   include/linux/memcontrol.h:451:53: warning: 'struct folio' declared inside parameter list will not be visible outside of this definition or declaration
     451 | static inline struct mem_cgroup *folio_memcg(struct folio *folio)
         |                                                     ^~~~~
   include/linux/memcontrol.h: In function 'folio_memcg':
   include/linux/memcontrol.h:453:23: error: passing argument 1 of 'folio_memcg_kmem' from incompatible pointer type [-Werror=incompatible-pointer-types]
     453 |  if (folio_memcg_kmem(folio))
         |                       ^~~~~
         |                       |
         |                       struct folio *
   include/linux/memcontrol.h:375:51: note: expected 'struct folio *' but argument is of type 'struct folio *'
     375 | static inline bool folio_memcg_kmem(struct folio *folio);
         |                                     ~~~~~~~~~~~~~~^~~~~
   include/linux/memcontrol.h:454:41: error: passing argument 1 of '__folio_objcg' from incompatible pointer type [-Werror=incompatible-pointer-types]
     454 |   return obj_cgroup_memcg(__folio_objcg(folio));
         |                                         ^~~~~
         |                                         |
         |                                         struct folio *
   include/linux/memcontrol.h:420:62: note: expected 'struct folio *' but argument is of type 'struct folio *'
     420 | static inline struct obj_cgroup *__folio_objcg(struct folio *folio)
         |                                                ~~~~~~~~~~~~~~^~~~~
   include/linux/memcontrol.h:455:23: error: passing argument 1 of '__folio_memcg' from incompatible pointer type [-Werror=incompatible-pointer-types]
     455 |  return __folio_memcg(folio);
         |                       ^~~~~
         |                       |
         |                       struct folio *
   include/linux/memcontrol.h:399:62: note: expected 'struct folio *' but argument is of type 'struct folio *'
     399 | static inline struct mem_cgroup *__folio_memcg(struct folio *folio)
         |                                                ~~~~~~~~~~~~~~^~~~~
   include/linux/memcontrol.h: In function 'page_memcg':
   include/linux/memcontrol.h:460:21: error: implicit declaration of function 'page_folio' [-Werror=implicit-function-declaration]
     460 |  return folio_memcg(page_folio(page));
         |                     ^~~~~~~~~~
   include/linux/memcontrol.h:460:21: warning: passing argument 1 of 'folio_memcg' makes pointer from integer without a cast [-Wint-conversion]
     460 |  return folio_memcg(page_folio(page));
         |                     ^~~~~~~~~~~~~~~~
         |                     |
         |                     int
   include/linux/memcontrol.h:451:60: note: expected 'struct folio *' but argument is of type 'int'
     451 | static inline struct mem_cgroup *folio_memcg(struct folio *folio)
         |                                              ~~~~~~~~~~~~~~^~~~~
   include/linux/memcontrol.h: At top level:
   include/linux/memcontrol.h:540:44: warning: 'struct folio' declared inside parameter list will not be visible outside of this definition or declaration
     540 | static inline bool folio_memcg_kmem(struct folio *folio)
         |                                            ^~~~~
   include/linux/memcontrol.h:540:20: error: conflicting types for 'folio_memcg_kmem'
     540 | static inline bool folio_memcg_kmem(struct folio *folio)
         |                    ^~~~~~~~~~~~~~~~
   include/linux/memcontrol.h:375:20: note: previous declaration of 'folio_memcg_kmem' was here
     375 | static inline bool folio_memcg_kmem(struct folio *folio);
         |                    ^~~~~~~~~~~~~~~~
   In file included from include/asm-generic/atomic-instrumented.h:20,
                    from include/linux/atomic.h:81,
                    from include/linux/crypto.h:15,
                    from arch/x86/kernel/asm-offsets.c:9:
   include/linux/memcontrol.h: In function 'folio_memcg_kmem':
   include/linux/memcontrol.h:542:35: error: dereferencing pointer to incomplete type 'struct folio'
     542 |  VM_BUG_ON_PGFLAGS(PageTail(&folio->page), &folio->page);
         |                                   ^~
   include/linux/build_bug.h:30:63: note: in definition of macro 'BUILD_BUG_ON_INVALID'
      30 | #define BUILD_BUG_ON_INVALID(e) ((void)(sizeof((__force long)(e))))
         |                                                               ^
   include/linux/memcontrol.h:542:2: note: in expansion of macro 'VM_BUG_ON_PGFLAGS'
     542 |  VM_BUG_ON_PGFLAGS(PageTail(&folio->page), &folio->page);
         |  ^~~~~~~~~~~~~~~~~
   In file included from include/linux/swap.h:9,
                    from include/linux/suspend.h:5,
                    from arch/x86/kernel/asm-offsets.c:13:
   include/linux/memcontrol.h: In function 'PageMemcgKmem':
   include/linux/memcontrol.h:606:26: warning: passing argument 1 of 'folio_memcg_kmem' makes pointer from integer without a cast [-Wint-conversion]
     606 |  return folio_memcg_kmem(page_folio(page));
         |                          ^~~~~~~~~~~~~~~~
         |                          |
         |                          int
   include/linux/memcontrol.h:540:51: note: expected 'struct folio *' but argument is of type 'int'
     540 | static inline bool folio_memcg_kmem(struct folio *folio)
         |                                     ~~~~~~~~~~~~~~^~~~~
   include/linux/memcontrol.h: At top level:
   include/linux/memcontrol.h:707:30: warning: 'struct folio' declared inside parameter list will not be visible outside of this definition or declaration
     707 | int mem_cgroup_charge(struct folio *, struct mm_struct *, gfp_t);
         |                              ^~~~~
   include/linux/memcontrol.h:712:33: warning: 'struct folio' declared inside parameter list will not be visible outside of this definition or declaration
     712 | void mem_cgroup_uncharge(struct folio *folio);
         |                                 ^~~~~
   include/linux/memcontrol.h:715:32: warning: 'struct folio' declared inside parameter list will not be visible outside of this definition or declaration
     715 | void mem_cgroup_migrate(struct folio *old, struct folio *new);
         |                                ^~~~~
   include/linux/memcontrol.h:759:50: warning: 'struct folio' declared inside parameter list will not be visible outside of this definition or declaration
     759 | static inline struct lruvec *folio_lruvec(struct folio *folio)
         |                                                  ^~~~~
   include/linux/memcontrol.h: In function 'folio_lruvec':
>> include/linux/memcontrol.h:761:41: error: passing argument 1 of 'folio_memcg' from incompatible pointer type [-Werror=incompatible-pointer-types]
     761 |  struct mem_cgroup *memcg = folio_memcg(folio);
         |                                         ^~~~~
         |                                         |
         |                                         struct folio *
   include/linux/memcontrol.h:451:60: note: expected 'struct folio *' but argument is of type 'struct folio *'
     451 | static inline struct mem_cgroup *folio_memcg(struct folio *folio)
         |                                              ~~~~~~~~~~~~~~^~~~~
>> include/linux/memcontrol.h:763:2: error: implicit declaration of function 'VM_WARN_ON_ONCE_FOLIO'; did you mean 'VM_WARN_ON_ONCE_PAGE'? [-Werror=implicit-function-declaration]
     763 |  VM_WARN_ON_ONCE_FOLIO(!memcg && !mem_cgroup_disabled(), folio);
         |  ^~~~~~~~~~~~~~~~~~~~~
         |  VM_WARN_ON_ONCE_PAGE
>> include/linux/memcontrol.h:764:34: error: implicit declaration of function 'folio_pgdat'; did you mean 'folio_nid'? [-Werror=implicit-function-declaration]
     764 |  return mem_cgroup_lruvec(memcg, folio_pgdat(folio));
         |                                  ^~~~~~~~~~~
         |                                  folio_nid
   include/linux/memcontrol.h:764:34: warning: passing argument 2 of 'mem_cgroup_lruvec' makes pointer from integer without a cast [-Wint-conversion]
     764 |  return mem_cgroup_lruvec(memcg, folio_pgdat(folio));
         |                                  ^~~~~~~~~~~~~~~~~~
         |                                  |
         |                                  int
   include/linux/memcontrol.h:727:33: note: expected 'struct pglist_data *' but argument is of type 'int'
     727 |             struct pglist_data *pgdat)
         |             ~~~~~~~~~~~~~~~~~~~~^~~~~
   include/linux/memcontrol.h: At top level:
   include/linux/memcontrol.h:952:30: warning: 'struct folio' declared inside parameter list will not be visible outside of this definition or declaration
     952 | void folio_memcg_lock(struct folio *folio);
         |                              ^~~~~
   include/linux/memcontrol.h:953:32: warning: 'struct folio' declared inside parameter list will not be visible outside of this definition or declaration
     953 | void folio_memcg_unlock(struct folio *folio);
         |                                ^~~~~
   include/linux/memcontrol.h:375:20: warning: 'folio_memcg_kmem' used but never defined
     375 | static inline bool folio_memcg_kmem(struct folio *folio);
         |                    ^~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors
   make[2]: *** [scripts/Makefile.build:117: arch/x86/kernel/asm-offsets.s] Error 1
   make[2]: Target '__build' not remade because of errors.
   make[1]: *** [Makefile:1212: prepare0] Error 2
   make[1]: Target 'modules_prepare' not remade because of errors.
   make: *** [Makefile:220: __sub-make] Error 2
   make: Target 'modules_prepare' not remade because of errors.
--
         |                  ^~~~~~~~~~
   include/linux/memcontrol.h: At top level:
   include/linux/memcontrol.h:420:55: warning: 'struct folio' declared inside parameter list will not be visible outside of this definition or declaration
     420 | static inline struct obj_cgroup *__folio_objcg(struct folio *folio)
         |                                                       ^~~~~
   include/linux/memcontrol.h: In function '__folio_objcg':
   include/linux/memcontrol.h:422:34: error: dereferencing pointer to incomplete type 'struct folio'
     422 |  unsigned long memcg_data = folio->memcg_data;
         |                                  ^~
   include/linux/memcontrol.h: At top level:
   include/linux/memcontrol.h:451:53: warning: 'struct folio' declared inside parameter list will not be visible outside of this definition or declaration
     451 | static inline struct mem_cgroup *folio_memcg(struct folio *folio)
         |                                                     ^~~~~
   include/linux/memcontrol.h: In function 'folio_memcg':
   include/linux/memcontrol.h:453:23: error: passing argument 1 of 'folio_memcg_kmem' from incompatible pointer type [-Werror=incompatible-pointer-types]
     453 |  if (folio_memcg_kmem(folio))
         |                       ^~~~~
         |                       |
         |                       struct folio *
   include/linux/memcontrol.h:375:51: note: expected 'struct folio *' but argument is of type 'struct folio *'
     375 | static inline bool folio_memcg_kmem(struct folio *folio);
         |                                     ~~~~~~~~~~~~~~^~~~~
   include/linux/memcontrol.h:454:41: error: passing argument 1 of '__folio_objcg' from incompatible pointer type [-Werror=incompatible-pointer-types]
     454 |   return obj_cgroup_memcg(__folio_objcg(folio));
         |                                         ^~~~~
         |                                         |
         |                                         struct folio *
   include/linux/memcontrol.h:420:62: note: expected 'struct folio *' but argument is of type 'struct folio *'
     420 | static inline struct obj_cgroup *__folio_objcg(struct folio *folio)
         |                                                ~~~~~~~~~~~~~~^~~~~
   include/linux/memcontrol.h:455:23: error: passing argument 1 of '__folio_memcg' from incompatible pointer type [-Werror=incompatible-pointer-types]
     455 |  return __folio_memcg(folio);
         |                       ^~~~~
         |                       |
         |                       struct folio *
   include/linux/memcontrol.h:399:62: note: expected 'struct folio *' but argument is of type 'struct folio *'
     399 | static inline struct mem_cgroup *__folio_memcg(struct folio *folio)
         |                                                ~~~~~~~~~~~~~~^~~~~
   include/linux/memcontrol.h: In function 'page_memcg':
   include/linux/memcontrol.h:460:21: error: implicit declaration of function 'page_folio' [-Werror=implicit-function-declaration]
     460 |  return folio_memcg(page_folio(page));
         |                     ^~~~~~~~~~
   include/linux/memcontrol.h:460:21: warning: passing argument 1 of 'folio_memcg' makes pointer from integer without a cast [-Wint-conversion]
     460 |  return folio_memcg(page_folio(page));
         |                     ^~~~~~~~~~~~~~~~
         |                     |
         |                     int
   include/linux/memcontrol.h:451:60: note: expected 'struct folio *' but argument is of type 'int'
     451 | static inline struct mem_cgroup *folio_memcg(struct folio *folio)
         |                                              ~~~~~~~~~~~~~~^~~~~
   include/linux/memcontrol.h: At top level:
   include/linux/memcontrol.h:540:44: warning: 'struct folio' declared inside parameter list will not be visible outside of this definition or declaration
     540 | static inline bool folio_memcg_kmem(struct folio *folio)
         |                                            ^~~~~
   include/linux/memcontrol.h:540:20: error: conflicting types for 'folio_memcg_kmem'
     540 | static inline bool folio_memcg_kmem(struct folio *folio)
         |                    ^~~~~~~~~~~~~~~~
   include/linux/memcontrol.h:375:20: note: previous declaration of 'folio_memcg_kmem' was here
     375 | static inline bool folio_memcg_kmem(struct folio *folio);
         |                    ^~~~~~~~~~~~~~~~
   In file included from include/asm-generic/atomic-instrumented.h:20,
                    from include/linux/atomic.h:81,
                    from include/linux/crypto.h:15,
                    from arch/x86/kernel/asm-offsets.c:9:
   include/linux/memcontrol.h: In function 'folio_memcg_kmem':
   include/linux/memcontrol.h:542:35: error: dereferencing pointer to incomplete type 'struct folio'
     542 |  VM_BUG_ON_PGFLAGS(PageTail(&folio->page), &folio->page);
         |                                   ^~
   include/linux/build_bug.h:30:63: note: in definition of macro 'BUILD_BUG_ON_INVALID'
      30 | #define BUILD_BUG_ON_INVALID(e) ((void)(sizeof((__force long)(e))))
         |                                                               ^
   include/linux/memcontrol.h:542:2: note: in expansion of macro 'VM_BUG_ON_PGFLAGS'
     542 |  VM_BUG_ON_PGFLAGS(PageTail(&folio->page), &folio->page);
         |  ^~~~~~~~~~~~~~~~~
   In file included from include/linux/swap.h:9,
                    from include/linux/suspend.h:5,
                    from arch/x86/kernel/asm-offsets.c:13:
   include/linux/memcontrol.h: In function 'PageMemcgKmem':
   include/linux/memcontrol.h:606:26: warning: passing argument 1 of 'folio_memcg_kmem' makes pointer from integer without a cast [-Wint-conversion]
     606 |  return folio_memcg_kmem(page_folio(page));
         |                          ^~~~~~~~~~~~~~~~
         |                          |
         |                          int
   include/linux/memcontrol.h:540:51: note: expected 'struct folio *' but argument is of type 'int'
     540 | static inline bool folio_memcg_kmem(struct folio *folio)
         |                                     ~~~~~~~~~~~~~~^~~~~
   include/linux/memcontrol.h: At top level:
   include/linux/memcontrol.h:707:30: warning: 'struct folio' declared inside parameter list will not be visible outside of this definition or declaration
     707 | int mem_cgroup_charge(struct folio *, struct mm_struct *, gfp_t);
         |                              ^~~~~
   include/linux/memcontrol.h:712:33: warning: 'struct folio' declared inside parameter list will not be visible outside of this definition or declaration
     712 | void mem_cgroup_uncharge(struct folio *folio);
         |                                 ^~~~~
   include/linux/memcontrol.h:715:32: warning: 'struct folio' declared inside parameter list will not be visible outside of this definition or declaration
     715 | void mem_cgroup_migrate(struct folio *old, struct folio *new);
         |                                ^~~~~
   include/linux/memcontrol.h:759:50: warning: 'struct folio' declared inside parameter list will not be visible outside of this definition or declaration
     759 | static inline struct lruvec *folio_lruvec(struct folio *folio)
         |                                                  ^~~~~
   include/linux/memcontrol.h: In function 'folio_lruvec':
>> include/linux/memcontrol.h:761:41: error: passing argument 1 of 'folio_memcg' from incompatible pointer type [-Werror=incompatible-pointer-types]
     761 |  struct mem_cgroup *memcg = folio_memcg(folio);
         |                                         ^~~~~
         |                                         |
         |                                         struct folio *
   include/linux/memcontrol.h:451:60: note: expected 'struct folio *' but argument is of type 'struct folio *'
     451 | static inline struct mem_cgroup *folio_memcg(struct folio *folio)
         |                                              ~~~~~~~~~~~~~~^~~~~
>> include/linux/memcontrol.h:763:2: error: implicit declaration of function 'VM_WARN_ON_ONCE_FOLIO'; did you mean 'VM_WARN_ON_ONCE_PAGE'? [-Werror=implicit-function-declaration]
     763 |  VM_WARN_ON_ONCE_FOLIO(!memcg && !mem_cgroup_disabled(), folio);
         |  ^~~~~~~~~~~~~~~~~~~~~
         |  VM_WARN_ON_ONCE_PAGE
>> include/linux/memcontrol.h:764:34: error: implicit declaration of function 'folio_pgdat'; did you mean 'folio_nid'? [-Werror=implicit-function-declaration]
     764 |  return mem_cgroup_lruvec(memcg, folio_pgdat(folio));
         |                                  ^~~~~~~~~~~
         |                                  folio_nid
   include/linux/memcontrol.h:764:34: warning: passing argument 2 of 'mem_cgroup_lruvec' makes pointer from integer without a cast [-Wint-conversion]
     764 |  return mem_cgroup_lruvec(memcg, folio_pgdat(folio));
         |                                  ^~~~~~~~~~~~~~~~~~
         |                                  |
         |                                  int
   include/linux/memcontrol.h:727:33: note: expected 'struct pglist_data *' but argument is of type 'int'
     727 |             struct pglist_data *pgdat)
         |             ~~~~~~~~~~~~~~~~~~~~^~~~~
   include/linux/memcontrol.h: At top level:
   include/linux/memcontrol.h:952:30: warning: 'struct folio' declared inside parameter list will not be visible outside of this definition or declaration
     952 | void folio_memcg_lock(struct folio *folio);
         |                              ^~~~~
   include/linux/memcontrol.h:953:32: warning: 'struct folio' declared inside parameter list will not be visible outside of this definition or declaration
     953 | void folio_memcg_unlock(struct folio *folio);
         |                                ^~~~~
   include/linux/memcontrol.h:375:20: warning: 'folio_memcg_kmem' used but never defined
     375 | static inline bool folio_memcg_kmem(struct folio *folio);
         |                    ^~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors
   make[2]: *** [scripts/Makefile.build:117: arch/x86/kernel/asm-offsets.s] Error 1
   make[2]: Target '__build' not remade because of errors.
   make[1]: *** [Makefile:1212: prepare0] Error 2
   make[1]: Target 'prepare' not remade because of errors.
   make: *** [Makefile:220: __sub-make] Error 2
   make: Target 'prepare' not remade because of errors.


vim +/folio_memcg +761 include/linux/memcontrol.h

   752	
   753	/**
   754	 * folio_lruvec - return lruvec for isolating/putting an LRU folio
   755	 * @folio: Pointer to the folio.
   756	 *
   757	 * This function relies on folio->mem_cgroup being stable.
   758	 */
   759	static inline struct lruvec *folio_lruvec(struct folio *folio)
   760	{
 > 761		struct mem_cgroup *memcg = folio_memcg(folio);
   762	
 > 763		VM_WARN_ON_ONCE_FOLIO(!memcg && !mem_cgroup_disabled(), folio);
 > 764		return mem_cgroup_lruvec(memcg, folio_pgdat(folio));
   765	}
   766	

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

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [Monitors]

  Powered by Linux