diff options
author | Joe Perches <joe@perches.com> | 2011-01-13 18:45:52 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-13 20:32:33 -0500 |
commit | 62c70bce8ac236514c610020bb1ae5b8bde965cb (patch) | |
tree | 24f13ae48325034f9a8c4385669adcef545b4836 | |
parent | c32b0d4b3f19c2f5d29568f8b7b72b61693f1277 (diff) |
mm: convert sprintf_symbol to %pS
Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Pekka Enberg <penberg@kernel.org>
Cc: Jiri Kosina <trivial@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | mm/slub.c | 11 | ||||
-rw-r--r-- | mm/vmalloc.c | 9 |
2 files changed, 6 insertions, 14 deletions
@@ -3636,7 +3636,7 @@ static int list_locations(struct kmem_cache *s, char *buf, | |||
3636 | len += sprintf(buf + len, "%7ld ", l->count); | 3636 | len += sprintf(buf + len, "%7ld ", l->count); |
3637 | 3637 | ||
3638 | if (l->addr) | 3638 | if (l->addr) |
3639 | len += sprint_symbol(buf + len, (unsigned long)l->addr); | 3639 | len += sprintf(buf + len, "%pS", (void *)l->addr); |
3640 | else | 3640 | else |
3641 | len += sprintf(buf + len, "<not-available>"); | 3641 | len += sprintf(buf + len, "<not-available>"); |
3642 | 3642 | ||
@@ -3946,12 +3946,9 @@ SLAB_ATTR(min_partial); | |||
3946 | 3946 | ||
3947 | static ssize_t ctor_show(struct kmem_cache *s, char *buf) | 3947 | static ssize_t ctor_show(struct kmem_cache *s, char *buf) |
3948 | { | 3948 | { |
3949 | if (s->ctor) { | 3949 | if (!s->ctor) |
3950 | int n = sprint_symbol(buf, (unsigned long)s->ctor); | 3950 | return 0; |
3951 | 3951 | return sprintf(buf, "%pS\n", s->ctor); | |
3952 | return n + sprintf(buf + n, "\n"); | ||
3953 | } | ||
3954 | return 0; | ||
3955 | } | 3952 | } |
3956 | SLAB_ATTR_RO(ctor); | 3953 | SLAB_ATTR_RO(ctor); |
3957 | 3954 | ||
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) | |||
2456 | seq_printf(m, "0x%p-0x%p %7ld", | 2456 | seq_printf(m, "0x%p-0x%p %7ld", |
2457 | v->addr, v->addr + v->size, v->size); | 2457 | v->addr, v->addr + v->size, v->size); |
2458 | 2458 | ||
2459 | if (v->caller) { | 2459 | if (v->caller) |
2460 | char buff[KSYM_SYMBOL_LEN]; | 2460 | seq_printf(m, " %pS", v->caller); |
2461 | |||
2462 | seq_putc(m, ' '); | ||
2463 | sprint_symbol(buff, (unsigned long)v->caller); | ||
2464 | seq_puts(m, buff); | ||
2465 | } | ||
2466 | 2461 | ||
2467 | if (v->nr_pages) | 2462 | if (v->nr_pages) |
2468 | seq_printf(m, " pages=%d", v->nr_pages); | 2463 | seq_printf(m, " pages=%d", v->nr_pages); |