[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190521151059.GM31203@kadam>
Date: Tue, 21 May 2019 18:10:59 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: Sven Van Asbroeck <thesven73@...il.com>
Cc: Greg KH <gregkh@...uxfoundation.org>, devel@...verdev.osuosl.org,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] staging: fieldbus: anybuss: force address space
conversion
On Tue, May 21, 2019 at 10:51:16AM -0400, Sven Van Asbroeck wrote:
> The regmap's context (stored as 'void *') consists of a pointer to
> __iomem. Mixing __iomem and non-__iomem addresses generates
> sparse warnings.
>
> Fix by using __force when converting to/from 'void __iomem *' and
> the regmap's context.
>
> Signed-off-by: Sven Van Asbroeck <TheSven73@...il.com>
> ---
> drivers/staging/fieldbus/anybuss/arcx-anybus.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/staging/fieldbus/anybuss/arcx-anybus.c b/drivers/staging/fieldbus/anybuss/arcx-anybus.c
> index a167fb68e355..8126e5535ada 100644
> --- a/drivers/staging/fieldbus/anybuss/arcx-anybus.c
> +++ b/drivers/staging/fieldbus/anybuss/arcx-anybus.c
> @@ -114,7 +114,7 @@ static void export_reset_1(struct device *dev, bool assert)
> static int read_reg_bus(void *context, unsigned int reg,
> unsigned int *val)
> {
> - void __iomem *base = context;
> + void __iomem *base = (__force void __iomem *)context;
There is no need to use __force. Just:
void __iomem *base = (void __iomem *)context;
For the rest as well.
regards,
dan carpenter
Powered by blists - more mailing lists