* [PATCH 0/7] Convert sprintf_symbol uses to %p[Ss] @ 2010-11-05 23:12 Joe Perches 2010-11-05 23:12 ` [PATCH 6/7] mm: Convert sprintf_symbol to %pS Joe Perches 0 siblings, 1 reply; 3+ messages in thread From: Joe Perches @ 2010-11-05 23:12 UTC (permalink / raw) To: Jiri Kosina Cc: linux-arm-kernel, linux-kernel, cluster-devel, linux-mm, linux-nfs, netdev Remove unnecessary declarations of temporary buffers. Use %pS or %ps as appropriate. Minor reformatting in a couple of places. Compiled, but otherwise untested. Joe Perches (7): arch/arm/kernel/traps.c: Convert sprintf_symbol to %pS arch/x86/kernel/pci-iommu_table.c: Convert sprintf_symbol to %pS fs/gfs2/glock.c: Convert sprintf_symbol to %pS fs/proc/base.c kernel/latencytop.c: Convert sprintf_symbol to %ps kernel/lockdep_proc.c: Convert sprintf_symbol to %pS mm: Convert sprintf_symbol to %pS net/sunrpc/clnt.c: Convert sprintf_symbol to %ps arch/arm/kernel/traps.c | 5 +---- arch/x86/kernel/pci-iommu_table.c | 18 ++++-------------- fs/gfs2/glock.c | 15 +++++++-------- fs/proc/base.c | 22 ++++++++-------------- kernel/latencytop.c | 23 +++++++++-------------- kernel/lockdep_proc.c | 16 ++++++---------- mm/slub.c | 11 ++++------- mm/vmalloc.c | 9 ++------- net/sunrpc/clnt.c | 12 ++---------- 9 files changed, 43 insertions(+), 88 deletions(-) -- 1.7.3.2.146.gca209 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom policy in Canada: sign http://dissolvethecrtc.ca/ Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a> ^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 6/7] mm: Convert sprintf_symbol to %pS 2010-11-05 23:12 [PATCH 0/7] Convert sprintf_symbol uses to %p[Ss] Joe Perches @ 2010-11-05 23:12 ` Joe Perches 2010-11-06 15:00 ` Pekka Enberg 0 siblings, 1 reply; 3+ messages in thread From: Joe Perches @ 2010-11-05 23:12 UTC (permalink / raw) To: Jiri Kosina Cc: Christoph Lameter, Pekka Enberg, Matt Mackall, linux-mm, linux-kernel Signed-off-by: Joe Perches <joe@perches.com> --- mm/slub.c | 11 ++++------- mm/vmalloc.c | 9 ++------- 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/mm/slub.c b/mm/slub.c index 8fd5401..43b3857 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -3660,7 +3660,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>"); @@ -3969,12 +3969,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 a3d66b3..b7e18f6 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -2450,13 +2450,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); -- 1.7.3.2.146.gca209 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom policy in Canada: sign http://dissolvethecrtc.ca/ Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a> ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 6/7] mm: Convert sprintf_symbol to %pS 2010-11-05 23:12 ` [PATCH 6/7] mm: Convert sprintf_symbol to %pS Joe Perches @ 2010-11-06 15:00 ` Pekka Enberg 0 siblings, 0 replies; 3+ messages in thread From: Pekka Enberg @ 2010-11-06 15:00 UTC (permalink / raw) To: Joe Perches Cc: Jiri Kosina, Christoph Lameter, Matt Mackall, linux-mm, linux-kernel, Andrew Morton On 6.11.2010 1.12, Joe Perches wrote: > Signed-off-by: Joe Perches<joe@perches.com> Acked-by: Pekka Enberg <penberg@kernel.org> I think this ought to go through Andrew's tree rather than the trivial tree. > --- > mm/slub.c | 11 ++++------- > mm/vmalloc.c | 9 ++------- > 2 files changed, 6 insertions(+), 14 deletions(-) > > diff --git a/mm/slub.c b/mm/slub.c > index 8fd5401..43b3857 100644 > --- a/mm/slub.c > +++ b/mm/slub.c > @@ -3660,7 +3660,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>"); > > @@ -3969,12 +3969,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 a3d66b3..b7e18f6 100644 > --- a/mm/vmalloc.c > +++ b/mm/vmalloc.c > @@ -2450,13 +2450,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); -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom policy in Canada: sign http://dissolvethecrtc.ca/ Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a> ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-11-06 15:00 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2010-11-05 23:12 [PATCH 0/7] Convert sprintf_symbol uses to %p[Ss] Joe Perches 2010-11-05 23:12 ` [PATCH 6/7] mm: Convert sprintf_symbol to %pS Joe Perches 2010-11-06 15:00 ` Pekka Enberg
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox