mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jesper Nilsson <jesper.nilsson@axis.com>
To: "Ben Dooks (Codethink)" <ben.dooks@codethink.co.uk>
Cc: Jesper Nilsson <jespern@axis.com>, Lars Persson <larper@axis.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	linux-arm-kernel <linux-arm-kernel@axis.com>,
	"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] pinctrl: artpec6: fix __iomem on reg in set
Date: Wed, 18 Dec 2019 17:26:16 +0100	[thread overview]
Message-ID: <20191218162616.qsxsltfsrxotzqhb@axis.com> (raw)
In-Reply-To: <20191218101602.2442868-1-ben.dooks@codethink.co.uk>

On Wed, Dec 18, 2019 at 11:16:02AM +0100, Ben Dooks (Codethink) wrote:
> The artpec6_pconf_set should have marked reg as __iomem,
>  which ends up making sparse complain about address
> space conversions. Add the __iomem to silence the
> following warnings:
> 
> drivers/pinctrl/pinctrl-artpec6.c:814:13: warning: incorrect type in assignment (different address spaces)
> drivers/pinctrl/pinctrl-artpec6.c:814:13:    expected unsigned int *reg
> drivers/pinctrl/pinctrl-artpec6.c:814:13:    got void [noderef] <asn:2> *
> drivers/pinctrl/pinctrl-artpec6.c:825:34: warning: incorrect type in argument 1 (different address spaces)
> drivers/pinctrl/pinctrl-artpec6.c:825:34:    expected void const volatile [noderef] <asn:2> *addr
> drivers/pinctrl/pinctrl-artpec6.c:825:34:    got unsigned int *reg
> drivers/pinctrl/pinctrl-artpec6.c:827:25: warning: incorrect type in argument 2 (different address spaces)
> drivers/pinctrl/pinctrl-artpec6.c:827:25:    expected void volatile [noderef] <asn:2> *addr
> drivers/pinctrl/pinctrl-artpec6.c:827:25:    got unsigned int *reg
> drivers/pinctrl/pinctrl-artpec6.c:837:34: warning: incorrect type in argument 1 (different address spaces)
> drivers/pinctrl/pinctrl-artpec6.c:837:34:    expected void const volatile [noderef] <asn:2> *addr
> drivers/pinctrl/pinctrl-artpec6.c:837:34:    got unsigned int *reg
> drivers/pinctrl/pinctrl-artpec6.c:840:25: warning: incorrect type in argument 2 (different address spaces)
> drivers/pinctrl/pinctrl-artpec6.c:840:25:    expected void volatile [noderef] <asn:2> *addr
> drivers/pinctrl/pinctrl-artpec6.c:840:25:    got unsigned int *reg
> drivers/pinctrl/pinctrl-artpec6.c:850:34: warning: incorrect type in argument 1 (different address spaces)
> drivers/pinctrl/pinctrl-artpec6.c:850:34:    expected void const volatile [noderef] <asn:2> *addr
> drivers/pinctrl/pinctrl-artpec6.c:850:34:    got unsigned int *reg
> drivers/pinctrl/pinctrl-artpec6.c:853:25: warning: incorrect type in argument 2 (different address spaces)
> drivers/pinctrl/pinctrl-artpec6.c:853:25:    expected void volatile [noderef] <asn:2> *addr
> drivers/pinctrl/pinctrl-artpec6.c:853:25:    got unsigned int *reg
> drivers/pinctrl/pinctrl-artpec6.c:864:34: warning: incorrect type in argument 1 (different address spaces)
> drivers/pinctrl/pinctrl-artpec6.c:864:34:    expected void const volatile [noderef] <asn:2> *addr
> drivers/pinctrl/pinctrl-artpec6.c:864:34:    got unsigned int *reg
> drivers/pinctrl/pinctrl-artpec6.c:867:25: warning: incorrect type in argument 2 (different address spaces)
> drivers/pinctrl/pinctrl-artpec6.c:867:25:    expected void volatile [noderef] <asn:2> *addr
> drivers/pinctrl/pinctrl-artpec6.c:867:25:    got unsigned int *reg
> 
> Signed-off-by: Ben Dooks (Codethink) <ben.dooks@codethink.co.uk>
> ---




> Cc: Lars Persson <lars.persson@axis.com>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Cc: linux-arm-kernel@axis.com
> Cc: linux-gpio@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> ---
>  drivers/pinctrl/pinctrl-artpec6.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/pinctrl/pinctrl-artpec6.c b/drivers/pinctrl/pinctrl-artpec6.c
> index 986e04ac6b5b..439a997b6bdb 100644
> --- a/drivers/pinctrl/pinctrl-artpec6.c
> +++ b/drivers/pinctrl/pinctrl-artpec6.c
> @@ -798,7 +798,7 @@ static int artpec6_pconf_set(struct pinctrl_dev *pctldev, unsigned int pin,
>  	enum pin_config_param param;
>  	unsigned int arg;
>  	unsigned int regval;
> -	unsigned int *reg;
> +	unsigned int __iomem *reg;

	void __iomem *reg;

We're using as an argument to readl()?

>  	int i;
>  
>  	/* Check for valid pin */
> -- 
> 2.24.0
> 

/^JN - Jesper Nilsson
-- 
               Jesper Nilsson -- jesper.nilsson@axis.com

  reply	other threads:[~2019-12-18 16:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-18 10:16 Ben Dooks (Codethink)
2019-12-18 16:26 ` Jesper Nilsson [this message]
2019-12-18 17:32   ` Ben Dooks
2020-01-07  9:39     ` Linus Walleij
2020-01-07 11:18       ` Jesper Nilsson
2020-01-07 12:52         ` Linus Walleij

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191218162616.qsxsltfsrxotzqhb@axis.com \
    --to=jesper.nilsson@axis.com \
    --cc=ben.dooks@codethink.co.uk \
    --cc=jespern@axis.com \
    --cc=larper@axis.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@axis.com \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®