Re: [PATCH] hwrng: ka-sa - fix __iomem on registers
From: Herbert Xu
Date: Fri Oct 25 2019 - 11:20:19 EST
On Tue, Oct 15, 2019 at 01:36:04PM +0100, Ben Dooks wrote:
> Add __ioemm attribute to reg_rng to fix the following
> sparse warnings:
>
> drivers/char/hw_random/ks-sa-rng.c:102:9: warning: incorrect type in argument 2 (different address spaces)
> drivers/char/hw_random/ks-sa-rng.c:102:9: expected void volatile [noderef] <asn:2> *addr
> drivers/char/hw_random/ks-sa-rng.c:102:9: got unsigned int *
> drivers/char/hw_random/ks-sa-rng.c:104:9: warning: incorrect type in argument 2 (different address spaces)
> drivers/char/hw_random/ks-sa-rng.c:104:9: expected void volatile [noderef] <asn:2> *addr
> drivers/char/hw_random/ks-sa-rng.c:104:9: got unsigned int *
> drivers/char/hw_random/ks-sa-rng.c:113:9: warning: incorrect type in argument 2 (different address spaces)
> drivers/char/hw_random/ks-sa-rng.c:113:9: expected void volatile [noderef] <asn:2> *addr
> drivers/char/hw_random/ks-sa-rng.c:113:9: got unsigned int *
> drivers/char/hw_random/ks-sa-rng.c:116:9: warning: incorrect type in argument 2 (different address spaces)
> drivers/char/hw_random/ks-sa-rng.c:116:9: expected void volatile [noderef] <asn:2> *addr
> drivers/char/hw_random/ks-sa-rng.c:116:9: got unsigned int *
> drivers/char/hw_random/ks-sa-rng.c:119:17: warning: incorrect type in argument 1 (different address spaces)
> drivers/char/hw_random/ks-sa-rng.c:119:17: expected void const volatile [noderef] <asn:2> *addr
> drivers/char/hw_random/ks-sa-rng.c:119:17: got unsigned int *
> drivers/char/hw_random/ks-sa-rng.c:121:9: warning: incorrect type in argument 2 (different address spaces)
> drivers/char/hw_random/ks-sa-rng.c:121:9: expected void volatile [noderef] <asn:2> *addr
> drivers/char/hw_random/ks-sa-rng.c:121:9: got unsigned int *
> drivers/char/hw_random/ks-sa-rng.c:132:9: warning: incorrect type in argument 2 (different address spaces)
> drivers/char/hw_random/ks-sa-rng.c:132:9: expected void volatile [noderef] <asn:2> *addr
> drivers/char/hw_random/ks-sa-rng.c:132:9: got unsigned int *
> drivers/char/hw_random/ks-sa-rng.c:143:19: warning: incorrect type in argument 1 (different address spaces)
> drivers/char/hw_random/ks-sa-rng.c:143:19: expected void const volatile [noderef] <asn:2> *addr
> drivers/char/hw_random/ks-sa-rng.c:143:19: got unsigned int *
> drivers/char/hw_random/ks-sa-rng.c:144:19: warning: incorrect type in argument 1 (different address spaces)
> drivers/char/hw_random/ks-sa-rng.c:144:19: expected void const volatile [noderef] <asn:2> *addr
> drivers/char/hw_random/ks-sa-rng.c:144:19: got unsigned int *
> drivers/char/hw_random/ks-sa-rng.c:146:9: warning: incorrect type in argument 2 (different address spaces)
> drivers/char/hw_random/ks-sa-rng.c:146:9: expected void volatile [noderef] <asn:2> *addr
> drivers/char/hw_random/ks-sa-rng.c:146:9: got unsigned int *
> drivers/char/hw_random/ks-sa-rng.c:160:25: warning: incorrect type in argument 1 (different address spaces)
> drivers/char/hw_random/ks-sa-rng.c:160:25: expected void const volatile [noderef] <asn:2> *addr
> drivers/char/hw_random/ks-sa-rng.c:160:25: got unsigned int *
> drivers/char/hw_random/ks-sa-rng.c:194:28: warning: incorrect type in assignment (different address spaces)
> drivers/char/hw_random/ks-sa-rng.c:194:28: expected struct trng_regs *reg_rng
> drivers/char/hw_random/ks-sa-rng.c:194:28: got void [noderef] <asn:2> *
>
> Signed-off-by: Ben Dooks <ben.dooks@xxxxxxxxxxxxxxx>
> Acked-by: Arnd Bergmann <arnd@xxxxxxxx>
> ---
> Cc: Arnd Bergmann <arnd@xxxxxxxx>
> Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
> Cc: linux-crypto@xxxxxxxxxxxxxxx
> Cc: linux-kernel@xxxxxxxxxxxxxxx
> ---
> drivers/char/hw_random/ks-sa-rng.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Patch applied. Thanks.
--
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt