Skip to content

Commit bc9d1f0

Browse files
committed
sh: j2: Use ioremap() to translate device tree address into kernel memory
Addresses the following warning when building j2_defconfig: arch/sh/kernel/cpu/sh2/probe.c: In function 'scan_cache': arch/sh/kernel/cpu/sh2/probe.c:24:16: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] 24 | j2_ccr_base = (u32 __iomem *)of_flat_dt_translate_address(node); | Fixes: 5a846ab ("sh: add support for J-Core J2 processor") Reviewed-by: Geert Uytterhoeven <[email protected]> Tested-by: Rob Landley <[email protected]> Signed-off-by: John Paul Adrian Glaubitz <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: John Paul Adrian Glaubitz <[email protected]>
1 parent ac9a786 commit bc9d1f0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/sh/kernel/cpu/sh2/probe.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ static int __init scan_cache(unsigned long node, const char *uname,
2121
if (!of_flat_dt_is_compatible(node, "jcore,cache"))
2222
return 0;
2323

24-
j2_ccr_base = (u32 __iomem *)of_flat_dt_translate_address(node);
24+
j2_ccr_base = ioremap(of_flat_dt_translate_address(node), 4);
2525

2626
return 1;
2727
}

0 commit comments

Comments
 (0)