From aa9ecc6b7fb1d8d32b94aee47da059f25042bc14 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Thu, 25 Aug 2016 23:00:59 +0000 Subject: [PATCH] powerpc-adapt-elf64_apply_relocate_add-for-kexec_file_load-checkpatch-fixes WARNING: line over 80 characters #111: FILE: arch/powerpc/kernel/elf_util_64.c:141: + pr_err("Symbol '%s' in common section.\n", name); WARNING: else is not generally useful after a break or return #121: FILE: arch/powerpc/kernel/elf_util_64.c:151: + return -ENOEXEC; + } else { WARNING: line over 80 characters #143: FILE: arch/powerpc/kernel/elf_util_64.c:174: + *(uint32_t *)location = value - (uint32_t)(uint64_t)location; WARNING: line over 80 characters #172: FILE: arch/powerpc/kernel/elf_util_64.c:249: + pr_err("%s: REL14 %li out of range!\n", obj_name, total: 0 errors, 4 warnings, 196 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/powerpc-adapt-elf64_apply_relocate_add-for-kexec_file_load.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: Thiago Jung Bauermann Signed-off-by: Andrew Morton --- arch/powerpc/kernel/elf_util_64.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/kernel/elf_util_64.c b/arch/powerpc/kernel/elf_util_64.c index 8f6b6c7f3eaa0b..23072eb880e6d7 100644 --- a/arch/powerpc/kernel/elf_util_64.c +++ b/arch/powerpc/kernel/elf_util_64.c @@ -140,7 +140,8 @@ int elf64_apply_relocate_add(const struct elf_info *elf_info, pr_err("Undefined symbol: %s\n", name); return -ENOEXEC; } else if (sym->st_shndx == SHN_COMMON) { - pr_err("Symbol '%s' in common section.\n", name); + pr_err("Symbol '%s' in common section.\n", + name); return -ENOEXEC; } } @@ -173,7 +174,8 @@ int elf64_apply_relocate_add(const struct elf_info *elf_info, break; case R_PPC64_REL32: - *(uint32_t *)location = value - (uint32_t)(uint64_t)location; + *(uint32_t *)location = + value - (uint32_t)(uint64_t)location; break; case R_PPC64_TOC: @@ -248,8 +250,8 @@ int elf64_apply_relocate_add(const struct elf_info *elf_info, /* Convert value to relative */ value -= address; if (value + 0x8000 > 0xffff || (value & 3) != 0) { - pr_err("%s: REL14 %li out of range!\n", obj_name, - (long int)value); + pr_err("%s: REL14 %li out of range!\n", + obj_name, (long int)value); return -ENOEXEC; }