From 0063be169b51fbdb13e3056c33af5b00b2ad4412 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Wed, 13 Jan 2016 16:15:48 +1100 Subject: [PATCH] mm-prepare-page_referenced-and-page_idle-to-new-thp-refcounting-checkpatch-fixes ERROR: code indent should use tabs where possible #171: FILE: mm/page_idle.c:75: + if (!pmd_present(*pmd))$ WARNING: please, no spaces at the start of a line #171: FILE: mm/page_idle.c:75: + if (!pmd_present(*pmd))$ WARNING: Missing a blank line after declarations #194: FILE: mm/page_idle.c:93: + pmd_t pmde = *pmd; + barrier(); WARNING: Missing a blank line after declarations #304: FILE: mm/rmap.c:867: + pmd_t pmde = *pmd; + barrier(); total: 1 errors, 3 warnings, 327 lines checked NOTE: Whitespace errors detected. You may wish to use scripts/cleanpatch or scripts/cleanfile ./patches/mm-prepare-page_referenced-and-page_idle-to-new-thp-refcounting.patch has style problems, please review. NOTE: If any of the errors are false positives, please report them to the maintainer, see CHECKPATCH in MAINTAINERS. Please run checkpatch prior to sending patches Cc: "Kirill A. Shutemov" Signed-off-by: Andrew Morton --- mm/page_idle.c | 3 ++- mm/rmap.c | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/mm/page_idle.c b/mm/page_idle.c index 2c9ebe12b40d4d..2c553ba969f862 100644 --- a/mm/page_idle.c +++ b/mm/page_idle.c @@ -72,7 +72,7 @@ static int page_idle_clear_pte_refs_one(struct page *page, if (pmd_trans_huge(*pmd)) { ptl = pmd_lock(mm, pmd); - if (!pmd_present(*pmd)) + if (!pmd_present(*pmd)) goto unlock_pmd; if (unlikely(!pmd_trans_huge(*pmd))) { spin_unlock(ptl); @@ -90,6 +90,7 @@ static int page_idle_clear_pte_refs_one(struct page *page, return SWAP_AGAIN; } else { pmd_t pmde = *pmd; + barrier(); if (!pmd_present(pmde) || pmd_trans_huge(pmde)) return SWAP_AGAIN; diff --git a/mm/rmap.c b/mm/rmap.c index 2616560f4cc4c8..6127c00b2262d9 100644 --- a/mm/rmap.c +++ b/mm/rmap.c @@ -866,6 +866,7 @@ static int page_referenced_one(struct page *page, struct vm_area_struct *vma, return ret; } else { pmd_t pmde = *pmd; + barrier(); if (!pmd_present(pmde) || pmd_trans_huge(pmde)) return SWAP_AGAIN;