summaryrefslogtreecommitdiffstats
path: root/arch/score/kernel/module.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2009-06-27 14:46:35 +0200
committerArnd Bergmann <arnd@arndb.de>2009-06-27 15:16:16 +0200
commitc6067472252c1d6155c7c01c93e0d580342cdb29 (patch)
tree985a0fdf5342bc6e73245bb4553e64e404cd9e48 /arch/score/kernel/module.c
parentbddc605955bca2d914ca621a7ef4ca6c271f55d8 (diff)
downloadop-kernel-dev-c6067472252c1d6155c7c01c93e0d580342cdb29.zip
op-kernel-dev-c6067472252c1d6155c7c01c93e0d580342cdb29.tar.gz
score: cleanups: dead code, 0 as pointer, shadowed variables
A few smaller issues found by sparse, some code that was never used, two instances of '0' instead of 'NULL' and local variables shadowing another one. Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/score/kernel/module.c')
-rw-r--r--arch/score/kernel/module.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/score/kernel/module.c b/arch/score/kernel/module.c
index 1a62557..4de8d47 100644
--- a/arch/score/kernel/module.c
+++ b/arch/score/kernel/module.c
@@ -57,17 +57,17 @@ int apply_relocate(Elf_Shdr *sechdrs, const char *strtab,
for (i = 0; i < relsec->sh_size / sizeof(Elf32_Rel); i++, rel++) {
unsigned long loc;
Elf32_Sym *sym;
- s32 offset;
+ s32 r_offset;
- offset = ELF32_R_SYM(rel->r_info);
- if ((offset < 0) ||
- (offset > (symsec->sh_size / sizeof(Elf32_Sym)))) {
+ r_offset = ELF32_R_SYM(rel->r_info);
+ if ((r_offset < 0) ||
+ (r_offset > (symsec->sh_size / sizeof(Elf32_Sym)))) {
printk(KERN_ERR "%s: bad relocation, section %d reloc %d\n",
me->name, relindex, i);
return -ENOEXEC;
}
- sym = ((Elf32_Sym *)symsec->sh_addr) + offset;
+ sym = ((Elf32_Sym *)symsec->sh_addr) + r_offset;
if ((rel->r_offset < 0) ||
(rel->r_offset > dstsec->sh_size - sizeof(u32))) {
@@ -152,7 +152,7 @@ int apply_relocate_add(Elf_Shdr *sechdrs, const char *strtab,
/* Given an address, look for it in the module exception tables. */
const struct exception_table_entry *search_module_dbetables(unsigned long addr)
{
- return 0;
+ return NULL;
}
/* Put in dbe list if necessary. */
OpenPOWER on IntegriCloud