aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2014-09-29 19:08:26 -0400
committerSteven Rostedt <rostedt@goodmis.org>2014-11-05 14:13:38 -0500
commit9761536e1d9e9e1f325fb04d4ad46b15a39eb94a (patch)
treea640a6fb114ddecc4e1b87c1731ac9d2bb683797 /fs
parenta3816ab0e8fe542a89a53b82506a8ddac063fbe3 (diff)
debugfs: Have debugfs_print_regs32() return void
The seq_printf() will soon just return void, and seq_has_overflowed() should be used instead to see if the seq can no longer accept input. As the return value of debugfs_print_regs32() has no users and the seq_file descriptor should be checked with seq_has_overflowed() instead of return values of functions, it is better to just have debugfs_print_regs32() also return void. Link: http://lkml.kernel.org/p/2634b19eb1c04a9d31148c1fe6f1f3819be95349.1412031505.git.joe@perches.com Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Joe Perches <joe@perches.com> [ original change only updated seq_printf() return, added return of void to debugfs_print_regs32() as well ] Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/debugfs/file.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/fs/debugfs/file.c b/fs/debugfs/file.c
index 76c08c2beb2f..8e0f2f410189 100644
--- a/fs/debugfs/file.c
+++ b/fs/debugfs/file.c
@@ -692,18 +692,19 @@ EXPORT_SYMBOL_GPL(debugfs_create_u32_array);
692 * because some peripherals have several blocks of identical registers, 692 * because some peripherals have several blocks of identical registers,
693 * for example configuration of dma channels 693 * for example configuration of dma channels
694 */ 694 */
695int debugfs_print_regs32(struct seq_file *s, const struct debugfs_reg32 *regs, 695void debugfs_print_regs32(struct seq_file *s, const struct debugfs_reg32 *regs,
696 int nregs, void __iomem *base, char *prefix) 696 int nregs, void __iomem *base, char *prefix)
697{ 697{
698 int i, ret = 0; 698 int i;
699 699
700 for (i = 0; i < nregs; i++, regs++) { 700 for (i = 0; i < nregs; i++, regs++) {
701 if (prefix) 701 if (prefix)
702 ret += seq_printf(s, "%s", prefix); 702 seq_printf(s, "%s", prefix);
703 ret += seq_printf(s, "%s = 0x%08x\n", regs->name, 703 seq_printf(s, "%s = 0x%08x\n", regs->name,
704 readl(base + regs->offset)); 704 readl(base + regs->offset));
705 if (seq_has_overflowed(s))
706 break;
705 } 707 }
706 return ret;
707} 708}
708EXPORT_SYMBOL_GPL(debugfs_print_regs32); 709EXPORT_SYMBOL_GPL(debugfs_print_regs32);
709 710