All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Sven Van Asbroeck <thesven73@gmail.com>
Cc: Greg KH <gregkh@linuxfoundation.org>,
	devel@driverdev.osuosl.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] staging: fieldbus: anybuss: force address space conversion
Date: Tue, 21 May 2019 18:10:59 +0300	[thread overview]
Message-ID: <20190521151059.GM31203@kadam> (raw)
In-Reply-To: <20190521145116.24378-1-TheSven73@gmail.com>

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@gmail.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


  reply	other threads:[~2019-05-21 15:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-21 14:51 [PATCH] staging: fieldbus: anybuss: force address space conversion Sven Van Asbroeck
2019-05-21 15:10 ` Dan Carpenter [this message]
2019-05-21 15:19   ` Sven Van Asbroeck
2019-05-21 15:42     ` Greg KH
2019-05-21 15:53       ` Sven Van Asbroeck
2019-05-21 16:24         ` Greg KH
2019-05-21 16:53           ` Sven Van Asbroeck
2019-05-21 17:06             ` Sven Van Asbroeck

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=20190521151059.GM31203@kadam \
    --to=dan.carpenter@oracle.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=thesven73@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.