summaryrefslogtreecommitdiffstats
path: root/kernel/kallsyms.c
diff options
context:
space:
mode:
authorAndrew Morton <akpm@linux-foundation.org>2007-07-16 08:41:24 +0200
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-16 18:05:50 +0200
commit19769b762607fea53c005a0068cf8939cecd2f9a (patch)
treed86ef5b2608ea09bb069c4c2bbdf7fe07a89dd8b /kernel/kallsyms.c
parentHFS+: add custom dentry hash and comparison operations (diff)
downloadlinux-19769b762607fea53c005a0068cf8939cecd2f9a.tar.xz
linux-19769b762607fea53c005a0068cf8939cecd2f9a.zip
sprint_symbol() cleanup
Remove pointless `else'. Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/kallsyms.c')
-rw-r--r--kernel/kallsyms.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/kernel/kallsyms.c b/kernel/kallsyms.c
index fed54418626c..0d662475dd9f 100644
--- a/kernel/kallsyms.c
+++ b/kernel/kallsyms.c
@@ -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. */