linux-renesas-soc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] soc: renesas: rcar-rst: fix __iomem on configure call
@ 2019-12-18 13:52 Ben Dooks (Codethink)
  2019-12-20 16:13 ` Geert Uytterhoeven
  0 siblings, 1 reply; 2+ messages in thread
From: Ben Dooks (Codethink) @ 2019-12-18 13:52 UTC (permalink / raw)
  To: ben.dooks
  Cc: Geert Uytterhoeven, Magnus Damm, linux-renesas-soc, linux-kernel

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

Signed-off-by: Ben Dooks (Codethink) <ben.dooks@codethink.co.uk>
---
Cc: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: Magnus Damm <magnus.damm@gmail.com>
Cc: linux-renesas-soc@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
 drivers/soc/renesas/rcar-rst.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/soc/renesas/rcar-rst.c b/drivers/soc/renesas/rcar-rst.c
index 14d05a070dd3..794d0a2659fe 100644
--- a/drivers/soc/renesas/rcar-rst.c
+++ b/drivers/soc/renesas/rcar-rst.c
@@ -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 = {
-- 
2.24.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] soc: renesas: rcar-rst: fix __iomem on configure call
  2019-12-18 13:52 [PATCH] soc: renesas: rcar-rst: fix __iomem on configure call Ben Dooks (Codethink)
@ 2019-12-20 16:13 ` Geert Uytterhoeven
  0 siblings, 0 replies; 2+ messages in thread
From: Geert Uytterhoeven @ 2019-12-20 16:13 UTC (permalink / raw)
  To: Ben Dooks (Codethink)
  Cc: Geert Uytterhoeven, Magnus Damm, Linux-Renesas,
	Linux Kernel Mailing List

Hi Ben,

On Wed, Dec 18, 2019 at 2:52 PM Ben Dooks (Codethink)
<ben.dooks@codethink.co.uk> wrote:
> 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

> 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
>
> Signed-off-by: Ben Dooks (Codethink) <ben.dooks@codethink.co.uk>

Thanks!

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
i.e. will queue in renesas-devel for v5.6...

> --- a/drivers/soc/renesas/rcar-rst.c
> +++ b/drivers/soc/renesas/rcar-rst.c
> @@ -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.

>  };
>
>  static const struct rst_config rcar_rst_gen1 __initconst = {

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-12-20 16:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-18 13:52 [PATCH] soc: renesas: rcar-rst: fix __iomem on configure call Ben Dooks (Codethink)
2019-12-20 16:13 ` Geert Uytterhoeven

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).