Skip to content

Commit

Permalink
mm-remove-legacy-install_special_mapping-code-checkpatch-fixes
Browse files Browse the repository at this point in the history
WARNING: nested (un)?likely() calls, IS_ERR already uses unlikely() internally
torvalds#83: FILE: arch/csky/kernel/vdso.c:81:
+	if (unlikely(IS_ERR(vma))) {

WARNING: nested (un)?likely() calls, IS_ERR already uses unlikely() internally
torvalds#97: FILE: arch/csky/kernel/vdso.c:92:
+	if (unlikely(IS_ERR(vma))) {

WARNING: nested (un)?likely() calls, IS_ERR already uses unlikely() internally
torvalds#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 <anton.ivanov@cambridgegreys.com>
Cc: Brian Cain <bcain@quicinc.com>
Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
Cc: Dinh Nguyen <dinguyen@kernel.org>
Cc: Guo Ren <guoren@kernel.org>
Cc: Jeff Xu <jeffxu@google.com>
Cc: Johannes Berg <johannes@sipsolutions.net>
Cc: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Cc: Liam R. Howlett <Liam.Howlett@oracle.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Nathan Chancellor <nathan@kernel.org>
Cc: Nicholas Piggin <npiggin@gmail.com>
Cc: Pedro Falcato <pedro.falcato@gmail.com>
Cc: Richard Weinberger <richard@nod.at>
Cc: Rich Felker <dalias@libc.org>
Cc: Rob Landley <rob@landley.net>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
  • Loading branch information
akpm00 committed Aug 28, 2024
1 parent 75cd66f commit 2f7a387
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions arch/csky/kernel/vdso.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion arch/sh/kernel/vsyscall/vsyscall.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 2f7a387

Please sign in to comment.