From: Andrew Morton Date: Mon, 16 Jul 2007 06:41:24 +0000 (-0700) Subject: sprint_symbol() cleanup X-Git-Tag: v2.6.23-rc1~836 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=19769b762607fea53c005a0068cf8939cecd2f9a;p=linux-2.6 sprint_symbol() cleanup Remove pointless `else'. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/kernel/kallsyms.c b/kernel/kallsyms.c index fed5441862..0d662475dd 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. */