linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [mmotm:master 149/256] mm/memory-failure.c:1587:33: error: passing argument 2 of 'migrate_pages' from incompatible pointer type
@ 2018-01-05  2:51 kbuild test robot
  2018-01-05  8:52 ` Michal Hocko
  0 siblings, 1 reply; 2+ messages in thread
From: kbuild test robot @ 2018-01-05  2:51 UTC (permalink / raw)
  To: Michal Hocko
  Cc: kbuild-all, Johannes Weiner, Zi Yan, Andrew Morton,
	Linux Memory Management List

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

tree:   git://git.cmpxchg.org/linux-mmotm.git master
head:   1ceb98996d2504dd4e0bcb5f4cb9009a18cd8aaa
commit: c714f7da3636f838c8ed46c7c477525c2ea98a0f [149/256] mm, migrate: remove reason argument from new_page_t
config: i386-randconfig-i1-201800 (attached as .config)
compiler: gcc-7 (Debian 7.2.0-12) 7.2.1 20171025
reproduce:
        git checkout c714f7da3636f838c8ed46c7c477525c2ea98a0f
        # save the attached .config to linux build tree
        make ARCH=i386 

All errors (new ones prefixed by >>):

   mm/memory-failure.c: In function 'soft_offline_huge_page':
>> mm/memory-failure.c:1587:33: error: passing argument 2 of 'migrate_pages' from incompatible pointer type [-Werror=incompatible-pointer-types]
     ret = migrate_pages(&pagelist, new_page, NULL, MPOL_MF_MOVE_ALL,
                                    ^~~~~~~~
   In file included from mm/memory-failure.c:51:0:
   include/linux/migrate.h:68:12: note: expected 'struct page * (*)(struct page *, long unsigned int)' but argument is of type 'struct page * (*)(struct page *, long unsigned int,  int **)'
    extern int migrate_pages(struct list_head *l, new_page_t new, free_page_t free,
               ^~~~~~~~~~~~~
   mm/memory-failure.c: In function '__soft_offline_page':
   mm/memory-failure.c:1665:34: error: passing argument 2 of 'migrate_pages' from incompatible pointer type [-Werror=incompatible-pointer-types]
      ret = migrate_pages(&pagelist, new_page, NULL, MPOL_MF_MOVE_ALL,
                                     ^~~~~~~~
   In file included from mm/memory-failure.c:51:0:
   include/linux/migrate.h:68:12: note: expected 'struct page * (*)(struct page *, long unsigned int)' but argument is of type 'struct page * (*)(struct page *, long unsigned int,  int **)'
    extern int migrate_pages(struct list_head *l, new_page_t new, free_page_t free,
               ^~~~~~~~~~~~~
   cc1: some warnings being treated as errors

vim +/migrate_pages +1587 mm/memory-failure.c

af8fae7c0 Naoya Horiguchi   2013-02-22  1555  
d950b9588 Naoya Horiguchi   2010-09-08  1556  static int soft_offline_huge_page(struct page *page, int flags)
d950b9588 Naoya Horiguchi   2010-09-08  1557  {
d950b9588 Naoya Horiguchi   2010-09-08  1558  	int ret;
d950b9588 Naoya Horiguchi   2010-09-08  1559  	unsigned long pfn = page_to_pfn(page);
d950b9588 Naoya Horiguchi   2010-09-08  1560  	struct page *hpage = compound_head(page);
b8ec1cee5 Naoya Horiguchi   2013-09-11  1561  	LIST_HEAD(pagelist);
d950b9588 Naoya Horiguchi   2010-09-08  1562  
af8fae7c0 Naoya Horiguchi   2013-02-22  1563  	/*
af8fae7c0 Naoya Horiguchi   2013-02-22  1564  	 * This double-check of PageHWPoison is to avoid the race with
af8fae7c0 Naoya Horiguchi   2013-02-22  1565  	 * memory_failure(). See also comment in __soft_offline_page().
af8fae7c0 Naoya Horiguchi   2013-02-22  1566  	 */
af8fae7c0 Naoya Horiguchi   2013-02-22  1567  	lock_page(hpage);
0ebff32c3 Xishi Qiu         2013-02-22  1568  	if (PageHWPoison(hpage)) {
af8fae7c0 Naoya Horiguchi   2013-02-22  1569  		unlock_page(hpage);
665d9da7f Wanpeng Li        2015-09-08  1570  		put_hwpoison_page(hpage);
0ebff32c3 Xishi Qiu         2013-02-22  1571  		pr_info("soft offline: %#lx hugepage already poisoned\n", pfn);
af8fae7c0 Naoya Horiguchi   2013-02-22  1572  		return -EBUSY;
0ebff32c3 Xishi Qiu         2013-02-22  1573  	}
af8fae7c0 Naoya Horiguchi   2013-02-22  1574  	unlock_page(hpage);
d950b9588 Naoya Horiguchi   2010-09-08  1575  
bcc542223 Naoya Horiguchi   2015-04-15  1576  	ret = isolate_huge_page(hpage, &pagelist);
bcc542223 Naoya Horiguchi   2015-04-15  1577  	/*
bcc542223 Naoya Horiguchi   2015-04-15  1578  	 * get_any_page() and isolate_huge_page() takes a refcount each,
bcc542223 Naoya Horiguchi   2015-04-15  1579  	 * so need to drop one here.
bcc542223 Naoya Horiguchi   2015-04-15  1580  	 */
665d9da7f Wanpeng Li        2015-09-08  1581  	put_hwpoison_page(hpage);
036138080 Wanpeng Li        2015-08-14  1582  	if (!ret) {
bcc542223 Naoya Horiguchi   2015-04-15  1583  		pr_info("soft offline: %#lx hugepage failed to isolate\n", pfn);
bcc542223 Naoya Horiguchi   2015-04-15  1584  		return -EBUSY;
bcc542223 Naoya Horiguchi   2015-04-15  1585  	}
bcc542223 Naoya Horiguchi   2015-04-15  1586  
68711a746 David Rientjes    2014-06-04 @1587  	ret = migrate_pages(&pagelist, new_page, NULL, MPOL_MF_MOVE_ALL,
b8ec1cee5 Naoya Horiguchi   2013-09-11  1588  				MIGRATE_SYNC, MR_MEMORY_FAILURE);
d950b9588 Naoya Horiguchi   2010-09-08  1589  	if (ret) {
b6b18aa87 Laszlo Toth       2017-11-15  1590  		pr_info("soft offline: %#lx: hugepage migration failed %d, type %lx (%pGp)\n",
82a2481e8 Anshuman Khandual 2017-05-03  1591  			pfn, ret, page->flags, &page->flags);
30809f559 Punit Agrawal     2017-06-02  1592  		if (!list_empty(&pagelist))
30809f559 Punit Agrawal     2017-06-02  1593  			putback_movable_pages(&pagelist);
b8ec1cee5 Naoya Horiguchi   2013-09-11  1594  		if (ret > 0)
b8ec1cee5 Naoya Horiguchi   2013-09-11  1595  			ret = -EIO;
af8fae7c0 Naoya Horiguchi   2013-02-22  1596  	} else {
b37ff71cc Naoya Horiguchi   2017-07-10  1597  		if (PageHuge(page))
c3114a84f Anshuman Khandual 2017-07-10  1598  			dissolve_free_huge_page(page);
a49ecbcd7 Jianguo Wu        2013-12-18  1599  	}
d950b9588 Naoya Horiguchi   2010-09-08  1600  	return ret;
d950b9588 Naoya Horiguchi   2010-09-08  1601  }
d950b9588 Naoya Horiguchi   2010-09-08  1602  

:::::: The code at line 1587 was first introduced by commit
:::::: 68711a746345c44ae00c64d8dbac6a9ce13ac54a mm, migration: add destination page freeing callback

:::::: TO: David Rientjes <rientjes@google.com>
:::::: CC: Linus Torvalds <torvalds@linux-foundation.org>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

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

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

* Re: [mmotm:master 149/256] mm/memory-failure.c:1587:33: error: passing argument 2 of 'migrate_pages' from incompatible pointer type
  2018-01-05  2:51 [mmotm:master 149/256] mm/memory-failure.c:1587:33: error: passing argument 2 of 'migrate_pages' from incompatible pointer type kbuild test robot
@ 2018-01-05  8:52 ` Michal Hocko
  0 siblings, 0 replies; 2+ messages in thread
From: Michal Hocko @ 2018-01-05  8:52 UTC (permalink / raw)
  To: kbuild test robot, Andrew Morton
  Cc: kbuild-all, Johannes Weiner, Zi Yan, Linux Memory Management List

Hi,

On Fri 05-01-18 10:51:40, Wu Fengguang wrote:
> tree:   git://git.cmpxchg.org/linux-mmotm.git master
> head:   1ceb98996d2504dd4e0bcb5f4cb9009a18cd8aaa
> commit: c714f7da3636f838c8ed46c7c477525c2ea98a0f [149/256] mm, migrate: remove reason argument from new_page_t
> config: i386-randconfig-i1-201800 (attached as .config)
> compiler: gcc-7 (Debian 7.2.0-12) 7.2.1 20171025
> reproduce:
>         git checkout c714f7da3636f838c8ed46c7c477525c2ea98a0f
>         # save the attached .config to linux build tree
>         make ARCH=i386 
> 
> All errors (new ones prefixed by >>):
> 
>    mm/memory-failure.c: In function 'soft_offline_huge_page':
> >> mm/memory-failure.c:1587:33: error: passing argument 2 of 'migrate_pages' from incompatible pointer type [-Werror=incompatible-pointer-types]
>      ret = migrate_pages(&pagelist, new_page, NULL, MPOL_MF_MOVE_ALL,
>                                     ^~~~~~~~
>    In file included from mm/memory-failure.c:51:0:
>    include/linux/migrate.h:68:12: note: expected 'struct page * (*)(struct page *, long unsigned int)' but argument is of type 'struct page * (*)(struct page *, long unsigned int,  int **)'
>     extern int migrate_pages(struct list_head *l, new_page_t new, free_page_t free,
>                ^~~~~~~~~~~~~
>    mm/memory-failure.c: In function '__soft_offline_page':
>    mm/memory-failure.c:1665:34: error: passing argument 2 of 'migrate_pages' from incompatible pointer type [-Werror=incompatible-pointer-types]
>       ret = migrate_pages(&pagelist, new_page, NULL, MPOL_MF_MOVE_ALL,
>                                      ^~~~~~~~
>    In file included from mm/memory-failure.c:51:0:
>    include/linux/migrate.h:68:12: note: expected 'struct page * (*)(struct page *, long unsigned int)' but argument is of type 'struct page * (*)(struct page *, long unsigned int,  int **)'
>     extern int migrate_pages(struct list_head *l, new_page_t new, free_page_t free,
>                ^~~~~~~~~~~~~
>    cc1: some warnings being treated as errors

Sorry about missing this one. I am wondering none of my configs has
CONFIG_MEMORY_FAILURE enabled... I've fixed that. Anyway, the fix is
trivial. Andrew, could you fold it to mm-migrate-remove-reason-argument-from-new_page_t.patch
---

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

end of thread, other threads:[~2018-01-05  8:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-05  2:51 [mmotm:master 149/256] mm/memory-failure.c:1587:33: error: passing argument 2 of 'migrate_pages' from incompatible pointer type kbuild test robot
2018-01-05  8:52 ` Michal Hocko

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).