Skip to content

Commit 411fcb2

Browse files
akpm00hnaz
authored andcommitted
powerpc-adapt-elf64_apply_relocate_add-for-kexec_file_load-checkpatch-fixes
WARNING: line over 80 characters torvalds#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 torvalds#121: FILE: arch/powerpc/kernel/elf_util_64.c:151: + return -ENOEXEC; + } else { WARNING: line over 80 characters torvalds#143: FILE: arch/powerpc/kernel/elf_util_64.c:174: + *(uint32_t *)location = value - (uint32_t)(uint64_t)location; WARNING: line over 80 characters torvalds#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 <bauerman@linux.vnet.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
1 parent 01982e5 commit 411fcb2

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

arch/powerpc/kernel/elf_util_64.c

+6-4
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,8 @@ int elf64_apply_relocate_add(const struct elf_info *elf_info,
140140
pr_err("Undefined symbol: %s\n", name);
141141
return -ENOEXEC;
142142
} else if (sym->st_shndx == SHN_COMMON) {
143-
pr_err("Symbol '%s' in common section.\n", name);
143+
pr_err("Symbol '%s' in common section.\n",
144+
name);
144145
return -ENOEXEC;
145146
}
146147
}
@@ -173,7 +174,8 @@ int elf64_apply_relocate_add(const struct elf_info *elf_info,
173174
break;
174175

175176
case R_PPC64_REL32:
176-
*(uint32_t *)location = value - (uint32_t)(uint64_t)location;
177+
*(uint32_t *)location =
178+
value - (uint32_t)(uint64_t)location;
177179
break;
178180

179181
case R_PPC64_TOC:
@@ -248,8 +250,8 @@ int elf64_apply_relocate_add(const struct elf_info *elf_info,
248250
/* Convert value to relative */
249251
value -= address;
250252
if (value + 0x8000 > 0xffff || (value & 3) != 0) {
251-
pr_err("%s: REL14 %li out of range!\n", obj_name,
252-
(long int)value);
253+
pr_err("%s: REL14 %li out of range!\n",
254+
obj_name, (long int)value);
253255
return -ENOEXEC;
254256
}
255257

0 commit comments

Comments
 (0)