From: Pekka Enberg <penberg@cs.helsinki.fi>
To: Joe Perches <joe@perches.com>
Cc: Jiri Kosina <trivial@kernel.org>,
Christoph Lameter <cl@linux-foundation.org>,
Matt Mackall <mpm@selenic.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH 6/7] mm: Convert sprintf_symbol to %pS
Date: Sat, 06 Nov 2010 17:00:36 +0200 [thread overview]
Message-ID: <4CD56D94.2000806@cs.helsinki.fi> (raw)
In-Reply-To: <1288998760-11775-7-git-send-email-joe@perches.com>
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);
WARNING: multiple messages have this Message-ID (diff)
From: Pekka Enberg <penberg@cs.helsinki.fi>
To: Joe Perches <joe@perches.com>
Cc: Jiri Kosina <trivial@kernel.org>,
Christoph Lameter <cl@linux-foundation.org>,
Matt Mackall <mpm@selenic.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH 6/7] mm: Convert sprintf_symbol to %pS
Date: Sat, 06 Nov 2010 17:00:36 +0200 [thread overview]
Message-ID: <4CD56D94.2000806@cs.helsinki.fi> (raw)
In-Reply-To: <1288998760-11775-7-git-send-email-joe@perches.com>
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>
next prev parent reply other threads:[~2010-11-06 15:00 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-05 23:12 [Cluster-devel] [PATCH 0/7] Convert sprintf_symbol uses to %p[Ss] Joe Perches
2010-11-05 23:12 ` Joe Perches
2010-11-05 23:12 ` Joe Perches
2010-11-05 23:12 ` Joe Perches
2010-11-05 23:12 ` [PATCH 1/7] arch/arm/kernel/traps.c: Convert sprintf_symbol to %pS Joe Perches
2010-11-05 23:12 ` Joe Perches
2010-11-05 23:12 ` [PATCH 2/7] arch/x86/kernel/pci-iommu_table.c: " Joe Perches
2010-11-10 15:48 ` Joerg Roedel
2010-11-05 23:12 ` [Cluster-devel] [PATCH 3/7] fs/gfs2/glock.c: " Joe Perches
2010-11-05 23:12 ` Joe Perches
2010-11-08 10:26 ` [Cluster-devel] " Steven Whitehouse
2010-11-08 10:26 ` Steven Whitehouse
2010-11-05 23:12 ` [PATCH 4/7] fs/proc/base.c kernel/latencytop.c: Convert sprintf_symbol to %ps Joe Perches
2010-11-05 23:12 ` [PATCH 5/7] kernel/lockdep_proc.c: Convert sprintf_symbol to %pS Joe Perches
2010-11-05 23:12 ` [PATCH 6/7] mm: " Joe Perches
2010-11-05 23:12 ` Joe Perches
2010-11-06 15:00 ` Pekka Enberg [this message]
2010-11-06 15:00 ` Pekka Enberg
2010-11-05 23:12 ` [PATCH 7/7] net/sunrpc/clnt.c: Convert sprintf_symbol to %ps Joe Perches
2010-11-05 23:12 ` Joe Perches
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4CD56D94.2000806@cs.helsinki.fi \
--to=penberg@cs.helsinki.fi \
--cc=akpm@linux-foundation.org \
--cc=cl@linux-foundation.org \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mpm@selenic.com \
--cc=trivial@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.