[PATCH 1/1] hugetlb: remove unused variable warning

From: Andrea Righi
Date: Sat Jul 26 2008 - 12:21:30 EST


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â

Signed-off-by: Andrea Righi <righi.andrea@xxxxxxxxx>
---
include/linux/hugetlb.h | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h
index 9a71d4c..6881313 100644
--- a/include/linux/hugetlb.h
+++ b/include/linux/hugetlb.h
@@ -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 */
--
1.5.4.3

--
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/