From: chengang@emindsoft.com.cn
To: akpm@linux-foundation.org, n-horiguchi@ah.jp.nec.com,
mike.kravetz@oracle.com, hillf.zj@alibaba-inc.com,
mhocko@suse.com, kirill.shutemov@linux.intel.com,
dan.j.williams@intel.com, dingel@linux.vnet.ibm.com,
baiyaowei@cmss.chinamobile.com
Cc: linux-kernel@vger.kernel.org,
Chen Gang <chengang@emindsoft.com.cn>,
Chen Gang <gang.chen.5i5j@gmail.com>
Subject: [PATCH] include/linux/hugetlb.h: Use bool instead of int for hugepage_migration_supported()
Date: Sun, 10 Apr 2016 21:57:24 +0800 [thread overview]
Message-ID: <1460296644-27566-1-git-send-email-chengang@emindsoft.com.cn> (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
reply other threads:[~2016-04-10 14:03 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1460296644-27566-1-git-send-email-chengang@emindsoft.com.cn \
--to=chengang@emindsoft.com.cn \
--cc=akpm@linux-foundation.org \
--cc=baiyaowei@cmss.chinamobile.com \
--cc=dan.j.williams@intel.com \
--cc=dingel@linux.vnet.ibm.com \
--cc=gang.chen.5i5j@gmail.com \
--cc=hillf.zj@alibaba-inc.com \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mhocko@suse.com \
--cc=mike.kravetz@oracle.com \
--cc=n-horiguchi@ah.jp.nec.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®