From: Andrew Morton Subject: mm-check-against-orig_pte-for-finish_fault-fix-checkpatch-fixes WARNING: braces {} are not necessary for single statement blocks #52: FILE: mm/memory.c:4199: + if (vmf->flags & FAULT_FLAG_ORIG_PTE_VALID) { + return !pte_same(*vmf->pte, vmf->orig_pte); + } total: 0 errors, 1 warnings, 59 lines checked NOTE: For some of the reported defects, checkpatch may be able to mechanically convert to the typical style using --fix or --fix-inplace. ./patches/mm-check-against-orig_pte-for-finish_fault-fix.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: Peter Xu Signed-off-by: Andrew Morton --- mm/memory.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) --- a/mm/memory.c~mm-check-against-orig_pte-for-finish_fault-fix-checkpatch-fixes +++ a/mm/memory.c @@ -4181,9 +4181,8 @@ void do_set_pte(struct vm_fault *vmf, st static bool vmf_pte_changed(struct vm_fault *vmf) { - if (vmf->flags & FAULT_FLAG_ORIG_PTE_VALID) { + if (vmf->flags & FAULT_FLAG_ORIG_PTE_VALID) return !pte_same(*vmf->pte, vmf->orig_pte); - } return !pte_none(*vmf->pte); } _