From: Joe Perches Date: Thu, 13 Jan 2011 23:45:52 +0000 (-0800) Subject: mm: convert sprintf_symbol to %pS X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=62c70bce8ac236514c610020bb1ae5b8bde965cb;p=openwrt%2Fstaging%2Fblogic.git mm: convert sprintf_symbol to %pS Signed-off-by: Joe Perches Acked-by: Pekka Enberg Cc: Jiri Kosina Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/slub.c b/mm/slub.c index 008cd743a36a..c7ef0070dd86 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -3636,7 +3636,7 @@ static int list_locations(struct kmem_cache *s, char *buf, len += sprintf(buf + len, "%7ld ", l->count); if (l->addr) - len += sprint_symbol(buf + len, (unsigned long)l->addr); + len += sprintf(buf + len, "%pS", (void *)l->addr); else len += sprintf(buf + len, ""); @@ -3946,12 +3946,9 @@ SLAB_ATTR(min_partial); static ssize_t ctor_show(struct kmem_cache *s, char *buf) { - if (s->ctor) { - int n = sprint_symbol(buf, (unsigned long)s->ctor); - - return n + sprintf(buf + n, "\n"); - } - return 0; + if (!s->ctor) + return 0; + return sprintf(buf, "%pS\n", s->ctor); } SLAB_ATTR_RO(ctor); diff --git a/mm/vmalloc.c b/mm/vmalloc.c index eb5cc7d00c5a..48245af07b10 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -2456,13 +2456,8 @@ static int s_show(struct seq_file *m, void *p) seq_printf(m, "0x%p-0x%p %7ld", v->addr, v->addr + v->size, v->size); - if (v->caller) { - char buff[KSYM_SYMBOL_LEN]; - - seq_putc(m, ' '); - sprint_symbol(buff, (unsigned long)v->caller); - seq_puts(m, buff); - } + if (v->caller) + seq_printf(m, " %pS", v->caller); if (v->nr_pages) seq_printf(m, " pages=%d", v->nr_pages);