* [PATCH 1/1] hugetlb: remove unused variable warning
@ 2008-07-26 16:21 Andrea Righi
0 siblings, 0 replies; only message in thread
From: Andrea Righi @ 2008-07-26 16:21 UTC (permalink / raw)
To: Andi Kleen; +Cc: akpm, torvalds, linux-kernel, Andrea Righi
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@gmail.com>
---
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2008-07-26 16:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-26 16:21 [PATCH 1/1] hugetlb: remove unused variable warning Andrea Righi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).