linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [akpm-mm:mm-unstable 244/249] mm/memory-failure.c:1679:59: error: 'SUBPAGE_INDEX_HWPOISON' undeclared
@ 2022-07-04  6:16 kernel test robot
  2022-07-04  7:03 ` HORIGUCHI NAOYA(堀口 直也)
  0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2022-07-04  6:16 UTC (permalink / raw)
  To: Naoya Horiguchi
  Cc: kbuild-all, linux-kernel, Andrew Morton, Linux Memory Management List

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-unstable
head:   ce4dc6b0378ef1bd305c37c94fb8aabee4c5be04
commit: 43906a2b9553df7799daed304529a6920e97f9e8 [244/249] mm, hwpoison, hugetlb: support saving mechanism of raw error pages
config: parisc-randconfig-r014-20220703 (https://download.01.org/0day-ci/archive/20220704/202207041434.cdFm3q6k-lkp@intel.com/config)
compiler: hppa-linux-gcc (GCC) 11.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/akpm/mm.git/commit/?id=43906a2b9553df7799daed304529a6920e97f9e8
        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 43906a2b9553df7799daed304529a6920e97f9e8
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=parisc SHELL=/bin/bash

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

All errors (new ones prefixed by >>):

   In file included from include/linux/mmzone.h:21,
                    from include/linux/gfp.h:6,
                    from include/linux/mm.h:7,
                    from mm/memory-failure.c:37:
   mm/memory-failure.c: In function 'raw_hwp_list_head':
>> mm/memory-failure.c:1679:59: error: 'SUBPAGE_INDEX_HWPOISON' undeclared (first use in this function)
    1679 |         return (struct llist_head *)&page_private(hpage + SUBPAGE_INDEX_HWPOISON);
         |                                                           ^~~~~~~~~~~~~~~~~~~~~~
   include/linux/mm_types.h:334:43: note: in definition of macro 'page_private'
     334 | #define page_private(page)              ((page)->private)
         |                                           ^~~~
   mm/memory-failure.c:1679:59: note: each undeclared identifier is reported only once for each function it appears in
    1679 |         return (struct llist_head *)&page_private(hpage + SUBPAGE_INDEX_HWPOISON);
         |                                                           ^~~~~~~~~~~~~~~~~~~~~~
   include/linux/mm_types.h:334:43: note: in definition of macro 'page_private'
     334 | #define page_private(page)              ((page)->private)
         |                                           ^~~~
   mm/memory-failure.c:1680:1: error: control reaches end of non-void function [-Werror=return-type]
    1680 | }
         | ^
   cc1: some warnings being treated as errors


vim +/SUBPAGE_INDEX_HWPOISON +1679 mm/memory-failure.c

  1676	
  1677	static inline struct llist_head *raw_hwp_list_head(struct page *hpage)
  1678	{
> 1679		return (struct llist_head *)&page_private(hpage + SUBPAGE_INDEX_HWPOISON);
  1680	}
  1681	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp


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

* Re: [akpm-mm:mm-unstable 244/249] mm/memory-failure.c:1679:59: error: 'SUBPAGE_INDEX_HWPOISON' undeclared
  2022-07-04  6:16 [akpm-mm:mm-unstable 244/249] mm/memory-failure.c:1679:59: error: 'SUBPAGE_INDEX_HWPOISON' undeclared kernel test robot
@ 2022-07-04  7:03 ` HORIGUCHI NAOYA(堀口 直也)
  0 siblings, 0 replies; 2+ messages in thread
From: HORIGUCHI NAOYA(堀口 直也) @ 2022-07-04  7:03 UTC (permalink / raw)
  To: kernel test robot, Andrew Morton
  Cc: kbuild-all, linux-kernel, Linux Memory Management List

On Mon, Jul 04, 2022 at 02:16:15PM +0800, kernel test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-unstable
> head:   ce4dc6b0378ef1bd305c37c94fb8aabee4c5be04
> commit: 43906a2b9553df7799daed304529a6920e97f9e8 [244/249] mm, hwpoison, hugetlb: support saving mechanism of raw error pages
> config: parisc-randconfig-r014-20220703 (https://download.01.org/0day-ci/archive/20220704/202207041434.cdFm3q6k-lkp@intel.com/config)
> compiler: hppa-linux-gcc (GCC) 11.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/akpm/mm.git/commit/?id=43906a2b9553df7799daed304529a6920e97f9e8
>         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 43906a2b9553df7799daed304529a6920e97f9e8
>         # save the config file
>         mkdir build_dir && cp config build_dir/.config
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=parisc SHELL=/bin/bash
> 
> If you fix the issue, kindly add following tag where applicable
> Reported-by: kernel test robot <lkp@intel.com>
> 
> All errors (new ones prefixed by >>):
> 
>    In file included from include/linux/mmzone.h:21,
>                     from include/linux/gfp.h:6,
>                     from include/linux/mm.h:7,
>                     from mm/memory-failure.c:37:
>    mm/memory-failure.c: In function 'raw_hwp_list_head':
> >> mm/memory-failure.c:1679:59: error: 'SUBPAGE_INDEX_HWPOISON' undeclared (first use in this function)
>     1679 |         return (struct llist_head *)&page_private(hpage + SUBPAGE_INDEX_HWPOISON);
>          |                                                           ^~~~~~~~~~~~~~~~~~~~~~
>    include/linux/mm_types.h:334:43: note: in definition of macro 'page_private'
>      334 | #define page_private(page)              ((page)->private)
>          |                                           ^~~~
>    mm/memory-failure.c:1679:59: note: each undeclared identifier is reported only once for each function it appears in
>     1679 |         return (struct llist_head *)&page_private(hpage + SUBPAGE_INDEX_HWPOISON);
>          |                                                           ^~~~~~~~~~~~~~~~~~~~~~
>    include/linux/mm_types.h:334:43: note: in definition of macro 'page_private'
>      334 | #define page_private(page)              ((page)->private)
>          |                                           ^~~~
>    mm/memory-failure.c:1680:1: error: control reaches end of non-void function [-Werror=return-type]
>     1680 | }
>          | ^
>    cc1: some warnings being treated as errors

I think that this problem was already mentioned previously, but the separate
fix seems to be fallen off when updating/rebasing (sorry about that). The
following diff should fix the problem.  I think that this can be folded into
the patch "mm, hwpoison, hugetlb: support saving mechanism of raw error pages"
(https://lore.kernel.org/linux-mm/20220704013312.2415700-5-naoya.horiguchi@linux.dev/).

Thanks,
Naoya Horiguchi
---

diff --git a/mm/memory-failure.c b/mm/memory-failure.c
index ba24b72b8764..ead9d43114dc 100644
--- a/mm/memory-failure.c
+++ b/mm/memory-failure.c
@@ -1670,6 +1670,7 @@ int mf_dax_kill_procs(struct address_space *mapping, pgoff_t index,
 EXPORT_SYMBOL_GPL(mf_dax_kill_procs);
 #endif /* CONFIG_FS_DAX */
 
+#ifdef CONFIG_HUGETLB_PAGE
 /*
  * Struct raw_hwp_page represents information about "raw error page",
  * constructing singly linked list originated from ->private field of
@@ -1804,7 +1805,6 @@ int __get_huge_page_for_hwpoison(unsigned long pfn, int flags)
 	return ret;
 }
 
-#ifdef CONFIG_HUGETLB_PAGE
 /*
  * Taking refcount of hugetlb pages needs extra care about race conditions
  * with basic operations like hugepage allocation/free/demotion.
@@ -1885,8 +1885,9 @@ static inline int try_memory_failure_hugetlb(unsigned long pfn, int flags, int *
 	return 0;
 }
 
-static inline void free_raw_hwp_pages(struct page *hpage, bool move_flag)
+static inline long free_raw_hwp_pages(struct page *hpage, bool move_flag)
 {
+	return 0;
 }
 #endif	/* CONFIG_HUGETLB_PAGE */
 

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

end of thread, other threads:[~2022-07-04  7:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-04  6:16 [akpm-mm:mm-unstable 244/249] mm/memory-failure.c:1679:59: error: 'SUBPAGE_INDEX_HWPOISON' undeclared kernel test robot
2022-07-04  7:03 ` HORIGUCHI NAOYA(堀口 直也)

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