Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1374788
| Path | csiph.com!news.freedyn.net!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | chengang@emindsoft.com.cn |
| Newsgroups | linux.kernel |
| Subject | [PATCH] include/linux/hugetlb.h: Use bool instead of int for hugepage_migration_supported() |
| Date | Sun, 10 Apr 2016 16:10:02 +0200 |
| Message-ID | <rmodQ-6er-23@gated-at.bofh.it> (permalink) |
| X-Alimail-Antispam | AC=CONTINUE;BC=0.09516624|-1;FP=0|0|0|0|0|-1|-1|-1;HT=e02c03277;MF=chengang@emindsoft.com.cn;NM=1;PH=DS;RN=13;RT=12;SR=0;TI=SMTPD_----4h-TQbL_1460296647; |
| X-Mailer | git-send-email 1.9.3 |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 39 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | linux-kernel@vger.kernel.org, Chen Gang <chengang@emindsoft.com.cn>, Chen Gang <gang.chen.5i5j@gmail.com> |
| X-Original-Date | Sun, 10 Apr 2016 21:57:24 +0800 |
| X-Original-Message-ID | <1460296644-27566-1-git-send-email-chengang@emindsoft.com.cn> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1374788 |
Show key headers only | View raw
From: Chen Gang <chengang@emindsoft.com.cn>
It is used as a pure bool function within kernel source wide.
Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
---
include/linux/hugetlb.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h
index e44c578..0f735ea 100644
--- a/include/linux/hugetlb.h
+++ b/include/linux/hugetlb.h
@@ -454,12 +454,12 @@ static inline pgoff_t basepage_index(struct page *page)
extern void dissolve_free_huge_pages(unsigned long start_pfn,
unsigned long end_pfn);
-static inline int hugepage_migration_supported(struct hstate *h)
+static inline bool hugepage_migration_supported(struct hstate *h)
{
#ifdef CONFIG_ARCH_ENABLE_HUGEPAGE_MIGRATION
return huge_page_shift(h) == PMD_SHIFT;
#else
- return 0;
+ return false;
#endif
}
@@ -521,7 +521,7 @@ static inline pgoff_t basepage_index(struct page *page)
return page->index;
}
#define dissolve_free_huge_pages(s, e) do {} while (0)
-#define hugepage_migration_supported(h) 0
+#define hugepage_migration_supported(h) false
static inline spinlock_t *huge_pte_lockptr(struct hstate *h,
struct mm_struct *mm, pte_t *pte)
--
1.9.3
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH] include/linux/hugetlb.h: Use bool instead of int for hugepage_migration_supported() chengang@emindsoft.com.cn - 2016-04-10 16:10 +0200
csiph-web