cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
* [Cluster-devel] [PATCH 0/7] Convert sprintf_symbol uses to %p[Ss]
@ 2010-11-05 23:12 Joe Perches
  2010-11-05 23:12 ` [Cluster-devel] [PATCH 3/7] fs/gfs2/glock.c: 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: cluster-devel.redhat.com

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



^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Cluster-devel] [PATCH 3/7] fs/gfs2/glock.c: Convert sprintf_symbol to %pS
  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-08 10:26   ` Steven Whitehouse
  0 siblings, 1 reply; 3+ messages in thread
From: Joe Perches @ 2010-11-05 23:12 UTC (permalink / raw)
  To: cluster-devel.redhat.com

Signed-off-by: Joe Perches <joe@perches.com>
---
 fs/gfs2/glock.c |   15 +++++++--------
 1 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c
index 8777885..08dd4a2 100644
--- a/fs/gfs2/glock.c
+++ b/fs/gfs2/glock.c
@@ -1627,18 +1627,17 @@ static const char *hflags2str(char *buf, unsigned flags, unsigned long iflags)
 static int dump_holder(struct seq_file *seq, const struct gfs2_holder *gh)
 {
 	struct task_struct *gh_owner = NULL;
-	char buffer[KSYM_SYMBOL_LEN];
 	char flags_buf[32];
 
-	sprint_symbol(buffer, gh->gh_ip);
 	if (gh->gh_owner_pid)
 		gh_owner = pid_task(gh->gh_owner_pid, PIDTYPE_PID);
-	gfs2_print_dbg(seq, " H: s:%s f:%s e:%d p:%ld [%s] %s\n",
-		  state2str(gh->gh_state),
-		  hflags2str(flags_buf, gh->gh_flags, gh->gh_iflags),
-		  gh->gh_error, 
-		  gh->gh_owner_pid ? (long)pid_nr(gh->gh_owner_pid) : -1,
-		  gh_owner ? gh_owner->comm : "(ended)", buffer);
+	gfs2_print_dbg(seq, " H: s:%s f:%s e:%d p:%ld [%s] %pS\n",
+		       state2str(gh->gh_state),
+		       hflags2str(flags_buf, gh->gh_flags, gh->gh_iflags),
+		       gh->gh_error,
+		       gh->gh_owner_pid ? (long)pid_nr(gh->gh_owner_pid) : -1,
+		       gh_owner ? gh_owner->comm : "(ended)",
+		       (void *)gh->gh_ip);
 	return 0;
 }
 
-- 
1.7.3.2.146.gca209



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [Cluster-devel] [PATCH 3/7] fs/gfs2/glock.c: Convert sprintf_symbol to %pS
  2010-11-05 23:12 ` [Cluster-devel] [PATCH 3/7] fs/gfs2/glock.c: Convert sprintf_symbol to %pS Joe Perches
@ 2010-11-08 10:26   ` Steven Whitehouse
  0 siblings, 0 replies; 3+ messages in thread
From: Steven Whitehouse @ 2010-11-08 10:26 UTC (permalink / raw)
  To: cluster-devel.redhat.com

Hi,

On Fri, 2010-11-05 at 16:12 -0700, Joe Perches wrote:
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
Seems like a good idea:
Acked-by: Steven Whitehouse <swhiteho@redhat.com>

Steve.

>  fs/gfs2/glock.c |   15 +++++++--------
>  1 files changed, 7 insertions(+), 8 deletions(-)
> 
> diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c
> index 8777885..08dd4a2 100644
> --- a/fs/gfs2/glock.c
> +++ b/fs/gfs2/glock.c
> @@ -1627,18 +1627,17 @@ static const char *hflags2str(char *buf, unsigned flags, unsigned long iflags)
>  static int dump_holder(struct seq_file *seq, const struct gfs2_holder *gh)
>  {
>  	struct task_struct *gh_owner = NULL;
> -	char buffer[KSYM_SYMBOL_LEN];
>  	char flags_buf[32];
>  
> -	sprint_symbol(buffer, gh->gh_ip);
>  	if (gh->gh_owner_pid)
>  		gh_owner = pid_task(gh->gh_owner_pid, PIDTYPE_PID);
> -	gfs2_print_dbg(seq, " H: s:%s f:%s e:%d p:%ld [%s] %s\n",
> -		  state2str(gh->gh_state),
> -		  hflags2str(flags_buf, gh->gh_flags, gh->gh_iflags),
> -		  gh->gh_error, 
> -		  gh->gh_owner_pid ? (long)pid_nr(gh->gh_owner_pid) : -1,
> -		  gh_owner ? gh_owner->comm : "(ended)", buffer);
> +	gfs2_print_dbg(seq, " H: s:%s f:%s e:%d p:%ld [%s] %pS\n",
> +		       state2str(gh->gh_state),
> +		       hflags2str(flags_buf, gh->gh_flags, gh->gh_iflags),
> +		       gh->gh_error,
> +		       gh->gh_owner_pid ? (long)pid_nr(gh->gh_owner_pid) : -1,
> +		       gh_owner ? gh_owner->comm : "(ended)",
> +		       (void *)gh->gh_ip);
>  	return 0;
>  }
>  




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-11-08 10:26 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 [Cluster-devel] [PATCH 0/7] Convert sprintf_symbol uses to %p[Ss] Joe Perches
2010-11-05 23:12 ` [Cluster-devel] [PATCH 3/7] fs/gfs2/glock.c: Convert sprintf_symbol to %pS Joe Perches
2010-11-08 10:26   ` Steven Whitehouse

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).