From 2f7a3872ccd4cc352c5de27493ff060132b51671 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Tue, 20 Aug 2024 18:23:03 -0700 Subject: [PATCH] mm-remove-legacy-install_special_mapping-code-checkpatch-fixes WARNING: nested (un)?likely() calls, IS_ERR already uses unlikely() internally #83: FILE: arch/csky/kernel/vdso.c:81: + if (unlikely(IS_ERR(vma))) { WARNING: nested (un)?likely() calls, IS_ERR already uses unlikely() internally #97: FILE: arch/csky/kernel/vdso.c:92: + if (unlikely(IS_ERR(vma))) { WARNING: nested (un)?likely() calls, IS_ERR already uses unlikely() internally #213: FILE: arch/sh/kernel/vsyscall/vsyscall.c:84: + if (unlikely(IS_ERR(vma))) total: 0 errors, 3 warnings, 249 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-remove-legacy-install_special_mapping-code.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: Anton Ivanov Cc: Brian Cain Cc: Christophe Leroy Cc: Dinh Nguyen Cc: Guo Ren Cc: Jeff Xu Cc: Johannes Berg Cc: John Paul Adrian Glaubitz Cc: Liam R. Howlett Cc: Linus Torvalds Cc: Michael Ellerman Cc: Nathan Chancellor Cc: Nicholas Piggin Cc: Pedro Falcato Cc: Richard Weinberger Cc: Rich Felker Cc: Rob Landley Cc: Yoshinori Sato Signed-off-by: Andrew Morton --- arch/csky/kernel/vdso.c | 4 ++-- arch/sh/kernel/vsyscall/vsyscall.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/csky/kernel/vdso.c b/arch/csky/kernel/vdso.c index 1cd13a2b34eb4f..5c9ef63c29f1d9 100644 --- a/arch/csky/kernel/vdso.c +++ b/arch/csky/kernel/vdso.c @@ -78,7 +78,7 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, (VM_READ | VM_EXEC | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC), &vdso_mapping); - if (unlikely(IS_ERR(vma))) { + if (IS_ERR(vma)) { ret = PTR_ERR(vma); mm->context.vdso = NULL; goto end; @@ -89,7 +89,7 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, vma = _install_special_mapping(mm, vdso_base, PAGE_SIZE, (VM_READ | VM_MAYREAD), &vvar_mapping); - if (unlikely(IS_ERR(vma))) { + if (IS_ERR(vma)) { ret = PTR_ERR(vma); mm->context.vdso = NULL; goto end; diff --git a/arch/sh/kernel/vsyscall/vsyscall.c b/arch/sh/kernel/vsyscall/vsyscall.c index e2db291d87cab3..add35c51e01781 100644 --- a/arch/sh/kernel/vsyscall/vsyscall.c +++ b/arch/sh/kernel/vsyscall/vsyscall.c @@ -81,7 +81,7 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp) VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC, &vdso_mapping); ret = PTR_ERR(vma); - if (unlikely(IS_ERR(vma))) + if (IS_ERR(vma)) goto up_fail; current->mm->context.vdso = (void *)addr;