From: Andrew Morton Date: Mon, 16 Jul 2007 06:41:24 +0000 (-0700) Subject: sprint_symbol() cleanup X-Git-Tag: firefly_0821_release~28032 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=19769b762607fea53c005a0068cf8939cecd2f9a;p=firefly-linux-kernel-4.4.55.git 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 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. */