* [PATCH] mm: thp: simplify the implementation of mk_huge_pmd
@ 2016-04-18 23:55 ` Yang Shi
0 siblings, 0 replies; 2+ messages in thread
From: Yang Shi @ 2016-04-18 23:55 UTC (permalink / raw)
To: akpm, kirill.shutemov, aarcange, hughd, mgorman
Cc: linux-kernel, linux-mm, linaro-kernel, yang.shi
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH] mm: thp: simplify the implementation of mk_huge_pmd
@ 2016-04-18 23:55 ` Yang Shi
0 siblings, 0 replies; 2+ messages in thread
From: Yang Shi @ 2016-04-18 23:55 UTC (permalink / raw)
To: akpm, kirill.shutemov, aarcange, hughd, mgorman
Cc: linux-kernel, linux-mm, linaro-kernel, yang.shi
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
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-04-19 0:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-18 23:55 [PATCH] mm: thp: simplify the implementation of mk_huge_pmd Yang Shi
2016-04-18 23:55 ` Yang Shi
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.