diff options
-rw-r--r-- | Documentation/filesystems/debugfs.txt | 2 | ||||
-rw-r--r-- | fs/debugfs/file.c | 15 | ||||
-rw-r--r-- | include/linux/debugfs.h | 7 |
3 files changed, 12 insertions, 12 deletions
diff --git a/Documentation/filesystems/debugfs.txt b/Documentation/filesystems/debugfs.txt index 3a863f692728..88ab81c79109 100644 --- a/Documentation/filesystems/debugfs.txt +++ b/Documentation/filesystems/debugfs.txt | |||
@@ -140,7 +140,7 @@ file. | |||
140 | struct dentry *parent, | 140 | struct dentry *parent, |
141 | struct debugfs_regset32 *regset); | 141 | struct debugfs_regset32 *regset); |
142 | 142 | ||
143 | int debugfs_print_regs32(struct seq_file *s, struct debugfs_reg32 *regs, | 143 | void debugfs_print_regs32(struct seq_file *s, struct debugfs_reg32 *regs, |
144 | int nregs, void __iomem *base, char *prefix); | 144 | int nregs, void __iomem *base, char *prefix); |
145 | 145 | ||
146 | The "base" argument may be 0, but you may want to build the reg32 array | 146 | The "base" argument may be 0, but you may want to build the reg32 array |
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 | */ |
695 | int debugfs_print_regs32(struct seq_file *s, const struct debugfs_reg32 *regs, | 695 | void 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 | } |
708 | EXPORT_SYMBOL_GPL(debugfs_print_regs32); | 709 | EXPORT_SYMBOL_GPL(debugfs_print_regs32); |
709 | 710 | ||
diff --git a/include/linux/debugfs.h b/include/linux/debugfs.h index 4d0b4d1aa132..d84f8c254a87 100644 --- a/include/linux/debugfs.h +++ b/include/linux/debugfs.h | |||
@@ -92,8 +92,8 @@ struct dentry *debugfs_create_regset32(const char *name, umode_t mode, | |||
92 | struct dentry *parent, | 92 | struct dentry *parent, |
93 | struct debugfs_regset32 *regset); | 93 | struct debugfs_regset32 *regset); |
94 | 94 | ||
95 | int debugfs_print_regs32(struct seq_file *s, const struct debugfs_reg32 *regs, | 95 | void debugfs_print_regs32(struct seq_file *s, const struct debugfs_reg32 *regs, |
96 | int nregs, void __iomem *base, char *prefix); | 96 | int nregs, void __iomem *base, char *prefix); |
97 | 97 | ||
98 | struct dentry *debugfs_create_u32_array(const char *name, umode_t mode, | 98 | struct dentry *debugfs_create_u32_array(const char *name, umode_t mode, |
99 | struct dentry *parent, | 99 | struct dentry *parent, |
@@ -233,10 +233,9 @@ static inline struct dentry *debugfs_create_regset32(const char *name, | |||
233 | return ERR_PTR(-ENODEV); | 233 | return ERR_PTR(-ENODEV); |
234 | } | 234 | } |
235 | 235 | ||
236 | static inline int debugfs_print_regs32(struct seq_file *s, const struct debugfs_reg32 *regs, | 236 | static inline void debugfs_print_regs32(struct seq_file *s, const struct debugfs_reg32 *regs, |
237 | int nregs, void __iomem *base, char *prefix) | 237 | int nregs, void __iomem *base, char *prefix) |
238 | { | 238 | { |
239 | return 0; | ||
240 | } | 239 | } |
241 | 240 | ||
242 | static inline bool debugfs_initialized(void) | 241 | static inline bool debugfs_initialized(void) |