Messages in this thread Patch in this message | | | From | Andrea Righi <> | Subject | [PATCH 1/1] hugetlb: remove unused variable warning | Date | Sat, 26 Jul 2008 18:21:17 +0200 |
| |
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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |