Skip to content

Commit

Permalink
powerpc/476: Fix sparse report
Browse files Browse the repository at this point in the history
Fix sparse errors:
  arch/powerpc/platforms/44x/ppc476.c:236:17: warning: cast removes address space '__iomem' of expression
  arch/powerpc/platforms/44x/ppc476.c:241:34: warning: incorrect type in argument 1 (different address spaces)
  arch/powerpc/platforms/44x/ppc476.c:241:34:    expected void const volatile [noderef] __iomem *addr
  arch/powerpc/platforms/44x/ppc476.c:241:34:    got unsigned char [usertype] *
  arch/powerpc/platforms/44x/ppc476.c:243:17: warning: incorrect type in argument 1 (different address spaces)
  arch/powerpc/platforms/44x/ppc476.c:243:17:    expected void volatile [noderef] __iomem *addr
  arch/powerpc/platforms/44x/ppc476.c:243:17:    got unsigned char [usertype] *[assigned] fpga

Mark 'fpga' pointer as __iomem.

Fixes: ab9a418 ("powerpc: Update currituck pci/usb fixup for new board revision")
Reported-by: kernel test robot <[email protected]>
Signed-off-by: Christophe Leroy <[email protected]>
Reviewed-by: Alistair Popple <[email protected]>
Signed-off-by: Michael Ellerman <[email protected]>
Link: https://lore.kernel.org/r/aa6055769b92a5d8685b8d0adab99c48a0b0ef4b.1631956926.git.christophe.leroy@csgroup.eu
  • Loading branch information
chleroy authored and mpe committed Oct 8, 2021
1 parent c45361a commit 494f238
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/powerpc/platforms/44x/ppc476.c
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ static int board_rev = -1;
static int __init ppc47x_get_board_rev(void)
{
int reg;
u8 *fpga;
u8 __iomem *fpga;
struct device_node *np = NULL;

if (of_machine_is_compatible("ibm,currituck")) {
Expand All @@ -233,7 +233,7 @@ static int __init ppc47x_get_board_rev(void)
if (!np)
goto fail;

fpga = (u8 *) of_iomap(np, 0);
fpga = of_iomap(np, 0);
of_node_put(np);
if (!fpga)
goto fail;
Expand Down

0 comments on commit 494f238

Please sign in to comment.