diff options
author | Joe Perches <joe@perches.com> | 2011-01-13 15:45:52 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-13 17:32:33 -0800 |
commit | 62c70bce8ac236514c610020bb1ae5b8bde965cb (patch) | |
tree | 24f13ae48325034f9a8c4385669adcef545b4836 /mm/slub.c | |
parent | c32b0d4b3f19c2f5d29568f8b7b72b61693f1277 (diff) | |
download | lwn-62c70bce8ac236514c610020bb1ae5b8bde965cb.tar.gz lwn-62c70bce8ac236514c610020bb1ae5b8bde965cb.zip |
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>
Diffstat (limited to 'mm/slub.c')
-rw-r--r-- | mm/slub.c | 11 |
1 files changed, 4 insertions, 7 deletions
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, "<not-available>"); @@ -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); |