Re: [mmotm:master 149/256] mm/migrate.c:1920:46: error: passing argument 2 of 'migrate_pages' from incompatible pointer type

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

 



On Fri 05-01-18 10:56:50, 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: x86_64-lkp (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=x86_64 
> 
> All errors (new ones prefixed by >>):
> 
>    mm/migrate.c: In function 'migrate_misplaced_page':
> >> mm/migrate.c:1920:46: error: passing argument 2 of 'migrate_pages' from incompatible pointer type [-Werror=incompatible-pointer-types]
>      nr_remaining = migrate_pages(&migratepages, alloc_misplaced_dst_page,
>                                                  ^~~~~~~~~~~~~~~~~~~~~~~~
>    mm/migrate.c:1364:5: note: expected 'struct page * (*)(struct page *, long unsigned int)' but argument is of type 'struct page * (*)(struct page *, long unsigned int,  int **)'
>     int migrate_pages(struct list_head *from, new_page_t get_new_page,
>         ^~~~~~~~~~~~~
>    cc1: some warnings being treated as errors

Doh. Yet another follow up fix for mm-migrate-remove-reason-argument-from-new_page_t.patch
---
>From a2efb6c1aac30646f948862f201f983a9596d747 Mon Sep 17 00:00:00 2001
From: Michal Hocko <mhocko@xxxxxxxx>
Date: Fri, 5 Jan 2018 10:04:15 +0100
Subject: [PATCH] mm, migrate: fix migration callback

kbuild robot has noticed
   mm/migrate.c: In function 'migrate_misplaced_page':
>> mm/migrate.c:1920:46: error: passing argument 2 of 'migrate_pages' from incompatible pointer type [-Werror=incompatible-pointer-types]
     nr_remaining = migrate_pages(&migratepages, alloc_misplaced_dst_page,
                                                 ^~~~~~~~~~~~~~~~~~~~~~~~
   mm/migrate.c:1364:5: note: expected 'struct page * (*)(struct page *, long unsigned int)' but argument is of type 'struct page * (*)(struct page *, long unsigned int,  int **)'
    int migrate_pages(struct list_head *from, new_page_t get_new_page,

Fix this by removing the excessive argument.

Reported-by: kbuild test robot <fengguang.wu@xxxxxxxxx>
Signed-off-by: Michal Hocko <mhocko@xxxxxxxx>
---
 mm/migrate.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/mm/migrate.c b/mm/migrate.c
index 3cb0f5955b41..5d0dc7b85f90 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -1797,8 +1797,7 @@ static bool migrate_balanced_pgdat(struct pglist_data *pgdat,
 }
 
 static struct page *alloc_misplaced_dst_page(struct page *page,
-					   unsigned long data,
-					   int **result)
+					   unsigned long data)
 {
 	int nid = (int) data;
 	struct page *newpage;
-- 
2.15.1

-- 
Michal Hocko
SUSE Labs

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



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