Skip to content

Commit

Permalink
sprint_symbol() cleanup
Browse files Browse the repository at this point in the history
Remove pointless `else'.

Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
akpm00 authored and Linus Torvalds committed Jul 16, 2007
1 parent d45bce8 commit 19769b7
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions kernel/kallsyms.c
Original file line number Diff line number Diff line change
Expand Up @@ -317,13 +317,12 @@ int sprint_symbol(char *buffer, unsigned long address)
name = kallsyms_lookup(address, &size, &offset, &modname, namebuf);
if (!name)
return sprintf(buffer, "0x%lx", address);
else {
if (modname)
return sprintf(buffer, "%s+%#lx/%#lx [%s]", name, offset,

if (modname)
return sprintf(buffer, "%s+%#lx/%#lx [%s]", name, offset,
size, modname);
else
return sprintf(buffer, "%s+%#lx/%#lx", name, offset, size);
}
else
return sprintf(buffer, "%s+%#lx/%#lx", name, offset, size);
}

/* Look up a kernel symbol and print it to the kernel messages. */
Expand Down

0 comments on commit 19769b7

Please sign in to comment.