linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/5] debugfs: pass NULL as the last parameter of debugfs_print_regs32()
@ 2012-10-27  8:05 Yan Hong
  2012-10-27  8:05 ` [PATCH 2/5] debugfs: return directly if failed to allocate memory in debug_fill_super() Yan Hong
                   ` (5 more replies)
  0 siblings, 6 replies; 10+ messages in thread
From: Yan Hong @ 2012-10-27  8:05 UTC (permalink / raw)
  To: gregkh; +Cc: linux-kernel, Alessandro Rubini

If 'prefix' is not used, pass NULL instead of empty string as the
last parameter of debugfs_print_regs32().

Cc: Alessandro Rubini <rubini@gnudd.com>

Signed-off-by: Yan Hong <clouds.yan@gmail.com>
---

This function is only used (twice) by the author of it, and the
'prefix' feature is never used. But it's a well-documented debugfs
API. It's added one year ago and appeared in many documents. I still
prefer to let this API stay unchanged and treat the empty string as
typo.

 drivers/usb/dwc3/debugfs.c |    2 +-
 fs/debugfs/file.c          |    3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/dwc3/debugfs.c b/drivers/usb/dwc3/debugfs.c
index d4a30f1..6557272 100644
--- a/drivers/usb/dwc3/debugfs.c
+++ b/drivers/usb/dwc3/debugfs.c
@@ -382,7 +382,7 @@ static int dwc3_regdump_show(struct seq_file *s, void *unused)
 
 	seq_printf(s, "DesignWare USB3 Core Register Dump\n");
 	debugfs_print_regs32(s, dwc3_regs, ARRAY_SIZE(dwc3_regs),
-			     dwc->regs, "");
+			     dwc->regs, NULL);
 	return 0;
 }
 
diff --git a/fs/debugfs/file.c b/fs/debugfs/file.c
index c5ca6ae..6bdd450 100644
--- a/fs/debugfs/file.c
+++ b/fs/debugfs/file.c
@@ -668,7 +668,8 @@ static int debugfs_show_regset32(struct seq_file *s, void *data)
 {
 	struct debugfs_regset32 *regset = s->private;
 
-	debugfs_print_regs32(s, regset->regs, regset->nregs, regset->base, "");
+	debugfs_print_regs32(s, regset->regs, regset->nregs,
+			regset->base, NULL);
 	return 0;
 }
 
-- 
1.7.9.5


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

end of thread, other threads:[~2012-10-27 16:19 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-27  8:05 [PATCH 1/5] debugfs: pass NULL as the last parameter of debugfs_print_regs32() Yan Hong
2012-10-27  8:05 ` [PATCH 2/5] debugfs: return directly if failed to allocate memory in debug_fill_super() Yan Hong
2012-10-27  8:05 ` [PATCH 3/5] debugfs: remove redundant initialization in __create_file() Yan Hong
2012-10-27  8:05 ` [PATCH 4/5] debugfs: remove redundant check in __debugfs_remove() Yan Hong
2012-10-27  8:05 ` [PATCH 5/5] debugfs: remove goto in debugfs_remount() Yan Hong
2012-10-27 15:06   ` Greg KH
2012-10-27 16:19     ` Yan Hong
2012-10-27 15:07 ` [PATCH 1/5] debugfs: pass NULL as the last parameter of debugfs_print_regs32() Greg KH
2012-10-27 15:45 ` Alessandro Rubini
2012-10-27 16:03   ` Greg KH

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).