From: Jeremy Fitzhardinge <jeremy.fitzhardinge@xxxxxxxxxx> The argument is basically the struct page of the pte_t * passed into the callback. But there's no need to pass that, since it can be fairly easily derived from the pte_t * itself if needed (and no current users need to do that anyway). Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@xxxxxxxxxx> --- arch/x86/xen/grant-table.c | 6 ++---- arch/x86/xen/mmu.c | 3 +-- include/linux/mm.h | 3 +-- mm/memory.c | 2 +- mm/vmalloc.c | 2 +- 5 files changed, 6 insertions(+), 10 deletions(-) diff --git a/arch/x86/xen/grant-table.c b/arch/x86/xen/grant-table.c index 49ba9b5..5bf892a 100644 --- a/arch/x86/xen/grant-table.c +++ b/arch/x86/xen/grant-table.c @@ -44,8 +44,7 @@ #include <asm/pgtable.h> -static int map_pte_fn(pte_t *pte, struct page *pmd_page, - unsigned long addr, void *data) +static int map_pte_fn(pte_t *pte, unsigned long addr, void *data) { unsigned long **frames = (unsigned long **)data; @@ -54,8 +53,7 @@ static int map_pte_fn(pte_t *pte, struct page *pmd_page, return 0; } -static int unmap_pte_fn(pte_t *pte, struct page *pmd_page, - unsigned long addr, void *data) +static int unmap_pte_fn(pte_t *pte, unsigned long addr, void *data) { set_pte_at(&init_mm, addr, pte, __pte(0)); diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c index 44924e5..2b2b98a 100644 --- a/arch/x86/xen/mmu.c +++ b/arch/x86/xen/mmu.c @@ -2656,8 +2656,7 @@ struct remap_data { struct mmu_update *mmu_update; }; -static int remap_area_mfn_pte_fn(pte_t *ptep, pgtable_t token, - unsigned long addr, void *data) +static int remap_area_mfn_pte_fn(pte_t *ptep, unsigned long addr, void *data) { struct remap_data *rmd = data; pte_t pte = pte_mkspecial(pfn_pte(rmd->mfn++, rmd->prot)); diff --git a/include/linux/mm.h b/include/linux/mm.h index 721f451..c51d1fc 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -1416,8 +1416,7 @@ struct page *follow_page(struct vm_area_struct *, unsigned long address, #define FOLL_DUMP 0x08 /* give error on hole if it would be zero */ #define FOLL_FORCE 0x10 /* get_user_pages read/write w/o permission */ -typedef int (*pte_fn_t)(pte_t *pte, pgtable_t token, unsigned long addr, - void *data); +typedef int (*pte_fn_t)(pte_t *pte, unsigned long addr, void *data); extern int apply_to_page_range(struct mm_struct *mm, unsigned long address, unsigned long size, pte_fn_t fn, void *data); diff --git a/mm/memory.c b/mm/memory.c index 02e48aa..999f953 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -1944,7 +1944,7 @@ static int apply_to_pte_range(struct mm_struct *mm, pmd_t *pmd, token = pmd_pgtable(*pmd); do { - err = fn(pte++, token, addr, data); + err = fn(pte++, addr, data); if (err) break; } while (addr += PAGE_SIZE, addr != end); diff --git a/mm/vmalloc.c b/mm/vmalloc.c index eb5cc7d..e95980a 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -2059,7 +2059,7 @@ void __attribute__((weak)) vmalloc_sync_all(void) } -static int f(pte_t *pte, pgtable_t table, unsigned long addr, void *data) +static int f(pte_t *pte, unsigned long addr, void *data) { /* apply_to_page_range() does all the hard work. */ return 0; -- 1.7.3.3 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxxx For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom policy in Canada: sign http://dissolvethecrtc.ca/ Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>