lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191218162616.qsxsltfsrxotzqhb@axis.com>
Date:   Wed, 18 Dec 2019 17:26:16 +0100
From:   Jesper Nilsson <jesper.nilsson@...s.com>
To:     "Ben Dooks (Codethink)" <ben.dooks@...ethink.co.uk>
Cc:     Jesper Nilsson <jespern@...s.com>, Lars Persson <larper@...s.com>,
        Linus Walleij <linus.walleij@...aro.org>,
        linux-arm-kernel <linux-arm-kernel@...s.com>,
        "linux-gpio@...r.kernel.org" <linux-gpio@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] pinctrl: artpec6: fix __iomem on reg in set

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@...ethink.co.uk>
> ---




> Cc: Lars Persson <lars.persson@...s.com>
> Cc: Linus Walleij <linus.walleij@...aro.org>
> Cc: linux-arm-kernel@...s.com
> Cc: linux-gpio@...r.kernel.org
> Cc: linux-kernel@...r.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@...s.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ