Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1382115 > unrolled thread

[PATCH] mm: thp: simplify the implementation of mk_huge_pmd

Started byYang Shi <yang.shi@linaro.org>
First post2016-04-19 02:30 +0200
Last post2016-04-19 02:30 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH] mm: thp: simplify the implementation of mk_huge_pmd Yang Shi <yang.shi@linaro.org> - 2016-04-19 02:30 +0200

#1382115 — [PATCH] mm: thp: simplify the implementation of mk_huge_pmd

FromYang Shi <yang.shi@linaro.org>
Date2016-04-19 02:30 +0200
Subject[PATCH] mm: thp: simplify the implementation of mk_huge_pmd
Message-ID<rprIe-6oT-17@gated-at.bofh.it>
The implementation of mk_huge_pmd looks verbose, it could be just simplified
to one line code.

Signed-off-by: Yang Shi <yang.shi@linaro.org>
---
 mm/huge_memory.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/mm/huge_memory.c b/mm/huge_memory.c
index 8adf3c2..fecbbc5 100644
--- a/mm/huge_memory.c
+++ b/mm/huge_memory.c
@@ -764,10 +764,7 @@ pmd_t maybe_pmd_mkwrite(pmd_t pmd, struct vm_area_struct *vma)
 
 static inline pmd_t mk_huge_pmd(struct page *page, pgprot_t prot)
 {
-	pmd_t entry;
-	entry = mk_pmd(page, prot);
-	entry = pmd_mkhuge(entry);
-	return entry;
+	return pmd_mkhuge(mk_pmd(page, prot));
 }
 
 static inline struct list_head *page_deferred_list(struct page *page)
-- 
2.0.2

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web