From b45445684198a946b587732265692e6495993abf Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Mon, 28 Apr 2008 02:12:39 -0700 Subject: [PATCH] mm: make early_pfn_to_nid() a C function Fix this (sparc64) mm/sparse-vmemmap.c: In function `vmemmap_verify': mm/sparse-vmemmap.c:64: warning: unused variable `pfn' by switching to a C function which touches its arg. (reason 3,555 why macros are bad) Also, the `nid' arg was misnamed. Reviewed-by: Christoph Lameter Acked-by: Andy Whitcroft Cc: Mel Gorman Cc: Andi Kleen Cc: KAMEZAWA Hiroyuki Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/mmzone.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index 498d6ceff2f..0aece6d8937 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h @@ -841,7 +841,10 @@ static inline struct zoneref *first_zones_zonelist(struct zonelist *zonelist, #if !defined(CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID) && \ !defined(CONFIG_ARCH_POPULATES_NODE_MAP) -#define early_pfn_to_nid(nid) (0UL) +static inline unsigned long early_pfn_to_nid(unsigned long pfn) +{ + return 0; +} #endif #ifdef CONFIG_FLATMEM -- 2.11.4.GIT