]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
hugetlb: remove unused variable warning
authorAndrea Righi <righi.andrea@gmail.com>
Sat, 26 Jul 2008 22:22:27 +0000 (15:22 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sun, 27 Jul 2008 03:16:47 +0000 (20:16 -0700)
Remove the following warning when CONFIG_HUGETLB_PAGE is not set:

ipc/shm.c: In function `shm_get_stat':
ipc/shm.c:565: warning: unused variable `h'

[akpm@linux-foundation.org: use tabs, not spaces]
Signed-off-by: Andrea Righi <righi.andrea@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/hugetlb.h

index 9a71d4cc88c8f399c63109a21a5dcc5ec9847270..32e0ef0f6e1fcdd7f67d83ffe985e6cbe8eb9a08 100644 (file)
@@ -273,7 +273,10 @@ struct hstate {};
 #define huge_page_mask(h) PAGE_MASK
 #define huge_page_order(h) 0
 #define huge_page_shift(h) PAGE_SHIFT
-#define pages_per_huge_page(h) 1
+static inline unsigned int pages_per_huge_page(struct hstate *h)
+{
+       return 1;
+}
 #endif
 
 #endif /* _LINUX_HUGETLB_H */