Re: [PATCH] mm/memory.c follow_hugetlb_page compiler error (MMOTM)

From: aglitke
Date: Mon Nov 12 2007 - 09:41:58 EST


Argh. Who runs with CONFIG_HUGETLB_PAGE not set anyway ;)

Acked-by: Adam Litke <agl@xxxxxxxxxx>

On Sat, 2007-11-10 at 19:54 -0500, Erez Zadok wrote:
> Using http://userweb.kernel.org/~akpm/mmotm/ timestamped "10-Nov-2007
> 22:46". CONFIG_HUGETLB_PAGE not set.
>
> $ make
> CC mm/memory.o
> mm/memory.c:1040:29: error: macro "follow_hugetlb_page" passed 8 arguments, but takes just 7
> mm/memory.c: In function 'get_user_pages':
> mm/memory.c:1039: error: 'follow_hugetlb_page' undeclared (first use in this function)
> mm/memory.c:1039: error: (Each undeclared identifier is reported only once
> mm/memory.c:1039: error: for each function it appears in.)
> make[1]: *** [mm/memory.o] Error 1
> make: *** [mm] Error 2
>
> Small patch below fixes compile error.
>
> Erez.
>
>
> Signed-off-by: Erez Zadok <ezk@xxxxxxxxxxxxx>
>
> diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h
> index bb03660..2496879 100644
> --- a/include/linux/hugetlb.h
> +++ b/include/linux/hugetlb.h
> @@ -106,7 +106,7 @@ static inline unsigned long hugetlb_total_pages(void)
> return 0;
> }
>
> -#define follow_hugetlb_page(m,v,p,vs,a,b,i) ({ BUG(); 0; })
> +#define follow_hugetlb_page(m,v,p,vs,a,b,i,w) ({ BUG(); 0; })
> #define follow_huge_addr(mm, addr, write) ERR_PTR(-EINVAL)
> #define copy_hugetlb_page_range(src, dst, vma) ({ BUG(); 0; })
> #define hugetlb_prefault(mapping, vma) ({ BUG(); 0; })
>
--
Adam Litke - (agl at us.ibm.com)
IBM Linux Technology Center

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/