提交 62c70bce 编写于 作者: J Joe Perches 提交者: Linus Torvalds

mm: convert sprintf_symbol to %pS

Signed-off-by: NJoe Perches <joe@perches.com>
Acked-by: NPekka Enberg <penberg@kernel.org>
Cc: Jiri Kosina <trivial@kernel.org>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 c32b0d4b
...@@ -3636,7 +3636,7 @@ static int list_locations(struct kmem_cache *s, char *buf, ...@@ -3636,7 +3636,7 @@ static int list_locations(struct kmem_cache *s, char *buf,
len += sprintf(buf + len, "%7ld ", l->count); len += sprintf(buf + len, "%7ld ", l->count);
if (l->addr) if (l->addr)
len += sprint_symbol(buf + len, (unsigned long)l->addr); len += sprintf(buf + len, "%pS", (void *)l->addr);
else else
len += sprintf(buf + len, "<not-available>"); len += sprintf(buf + len, "<not-available>");
...@@ -3946,12 +3946,9 @@ SLAB_ATTR(min_partial); ...@@ -3946,12 +3946,9 @@ SLAB_ATTR(min_partial);
static ssize_t ctor_show(struct kmem_cache *s, char *buf) static ssize_t ctor_show(struct kmem_cache *s, char *buf)
{ {
if (s->ctor) { if (!s->ctor)
int n = sprint_symbol(buf, (unsigned long)s->ctor); return 0;
return sprintf(buf, "%pS\n", s->ctor);
return n + sprintf(buf + n, "\n");
}
return 0;
} }
SLAB_ATTR_RO(ctor); SLAB_ATTR_RO(ctor);
......
...@@ -2456,13 +2456,8 @@ static int s_show(struct seq_file *m, void *p) ...@@ -2456,13 +2456,8 @@ static int s_show(struct seq_file *m, void *p)
seq_printf(m, "0x%p-0x%p %7ld", seq_printf(m, "0x%p-0x%p %7ld",
v->addr, v->addr + v->size, v->size); v->addr, v->addr + v->size, v->size);
if (v->caller) { if (v->caller)
char buff[KSYM_SYMBOL_LEN]; seq_printf(m, " %pS", v->caller);
seq_putc(m, ' ');
sprint_symbol(buff, (unsigned long)v->caller);
seq_puts(m, buff);
}
if (v->nr_pages) if (v->nr_pages)
seq_printf(m, " pages=%d", v->nr_pages); seq_printf(m, " pages=%d", v->nr_pages);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册