Skip to contentSkip to conversation

soc: renesas: rcar-rst: fix __iomem on configure call

PATCH In review Ben Dooks (Codethink) 2 participants 2 messages Dec 18, 2019 – Dec 20, 2019 Arm/RISC-V/Renesas architecture

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 soc: renesas: rcar-rst: fix __iomem on configure call

The configure call back takes a register pointer, so should have been marked with __iomem. Add this to silence the following sparse warnings:

rivers/soc/renesas/rcar-rst.c:33:22: warning: incorrect type in initializer (incompatible argument 1 (different address spaces))
drivers/soc/renesas/rcar-rst.c:33:22: expected int ( *configure )( ... )
drivers/soc/renesas/rcar-rst.c:33:22: got int ( * )( ... )
drivers/soc/renesas/rcar-rst.c:97:40: warning: incorrect type in argument 1 (different address spaces)
drivers/soc/renesas/rcar-rst.c:97:40: expected void *base
drivers/soc/renesas/rcar-rst.c:97:40: got void [noderef] <asn:2> *[assigned] base

---
Cc: Geert Uytterhoeven <[email protected]>
Cc: Magnus Damm <[email protected]>
Cc: [email protected]
Cc: [email protected]

---
 drivers/soc/renesas/rcar-rst.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/soc/renesas/rcar-rst.c +1 -1
index 14d05a070dd3..794d0a2659fe 100644
@@ -21,7 +21,7 @@ static int rcar_rst_enable_wdt_reset(void __iomem *base)
 
 struct rst_config {
 	unsigned int modemr;		/* Mode Monitoring Register Offset */
-	int (*configure)(void *base);	/* Platform specific configuration */
+	int (*configure)(void __iomem *base);	/* Platform specific configuration */
 };
 
 static const struct rst_config rcar_rst_gen1 __initconst = {
Signature · 1 line
2.24.0
Reviewed-by on v1 1/1
#1 lore raw

Hi Ben,

Quoted 5 lines · Ben Dooks (Codethink)

The configure call back takes a register pointer, so should have been marked with __iomem. Add this to silence the following sparse warnings:

rivers/soc/renesas/rcar-rst.c:33:22: warning: incorrect type in initializer (incompatible argument 1 (different address spaces))

d

Quoted 7 lines

drivers/soc/renesas/rcar-rst.c:33:22: expected int ( *configure )( ... )
drivers/soc/renesas/rcar-rst.c:33:22: got int ( * )( ... )
drivers/soc/renesas/rcar-rst.c:97:40: warning: incorrect type in argument 1 (different address spaces)
drivers/soc/renesas/rcar-rst.c:97:40: expected void *base
drivers/soc/renesas/rcar-rst.c:97:40: got void [noderef] <asn:2> *[assigned] base

Thanks!

i.e. will queue in renesas-devel for v5.6...

drivers/soc/renesas/rcar-rst.c static int rcar_rst_enable_wdt_reset(void __iomem *base) · line 24

Quoted 8 lines
drivers/soc/renesas/rcar-rst.c +1 -1
@@ -21,7 +21,7 @@ static int rcar_rst_enable_wdt_reset(void __iomem *base)
 
 struct rst_config {
        unsigned int modemr;            /* Mode Monitoring Register Offset */
-       int (*configure)(void *base);   /* Platform specific configuration */
+       int (*configure)(void __iomem *base);   /* Platform specific configuration */

... with s/configuration/config/ to conform to the 80-char line limit.

drivers/soc/renesas/rcar-rst.c static int rcar_rst_enable_wdt_reset(void __iomem *base) · line 27

Quoted 3 lines
drivers/soc/renesas/rcar-rst.c +0 -0
 };
 
 static const struct rst_config rcar_rst_gen1 __initconst = {

Gr{oetje,eeting}s,

Geert

Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds