Skip to content

Commit

Permalink
debugfs: remove unneeded cast in debugfs_print_regs32()
Browse files Browse the repository at this point in the history
The cast here causes a Sparse warning:
fs/debugfs/file.c:561:42: warning: cast removes address space of expression
fs/debugfs/file.c:561:42: warning: incorrect type in argument 1 (different address spaces)
fs/debugfs/file.c:561:42:    expected void const volatile [noderef] <asn:2>*addr
fs/debugfs/file.c:561:42:    got void *<noident>

It's redundant to cast it to a (void *) anyway when it is already a
(void __iomem *).

Signed-off-by: Dan Carpenter <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
Dan Carpenter authored and gregkh committed Nov 27, 2011
1 parent 124a6b4 commit 5858441
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/debugfs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,7 @@ int debugfs_print_regs32(struct seq_file *s, const struct debugfs_reg32 *regs,
if (prefix)
ret += seq_printf(s, "%s", prefix);
ret += seq_printf(s, "%s = 0x%08x\n", regs->name,
readl((void *)(base + regs->offset)));
readl(base + regs->offset));
}
return ret;
}
Expand Down

0 comments on commit 5858441

Please sign in to comment.