public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
	liodot@gmail.com, charrer@alacritech.com
Subject: Re: [PATCH] staging: slicoss: fix different address space warnings
Date: Tue, 15 Nov 2016 19:22:05 +0100	[thread overview]
Message-ID: <20161115182205.GA11024@kroah.com> (raw)
In-Reply-To: <1479230377-22861-1-git-send-email-sergio.paracuellos@gmail.com>

On Tue, Nov 15, 2016 at 06:19:37PM +0100, Sergio Paracuellos wrote:
> This patch fix the following sparse warnings in slicoss driver:
> warning: incorrect type in assignment (different address spaces)
> 
> Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
> ---
>  drivers/staging/slicoss/slic.h    |  7 ++++
>  drivers/staging/slicoss/slicoss.c | 83 ++++++++++++++++++++++-----------------
>  2 files changed, 55 insertions(+), 35 deletions(-)
> 
> diff --git a/drivers/staging/slicoss/slic.h b/drivers/staging/slicoss/slic.h
> index 420546d..f76c0cd 100644
> --- a/drivers/staging/slicoss/slic.h
> +++ b/drivers/staging/slicoss/slic.h
> @@ -540,6 +540,13 @@ static inline void slic_flush_write(struct adapter *adapter)
>  	ioread32(adapter->regs + SLIC_REG_HOSTID);
>  }
>  
> +#define IOMEM_GET_FIELDADDR(base, member)				\
> +({									\
> +	char __iomem *_base = (char __iomem *)base;			\
> +	_base += offsetof(typeof(*base), member);			\
> +	(void __iomem *)_base;						\
> +})

Really?  Why?  Shouldn't you be marking base as __iomem all the time?
That way you don't need this mess of a cast.

thanks,

greg k-h

  reply	other threads:[~2016-11-15 18:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-15 17:19 [PATCH] staging: slicoss: fix different address space warnings Sergio Paracuellos
2016-11-15 18:22 ` Greg KH [this message]
2016-11-15 19:11 ` kbuild test robot
2016-11-15 21:06 ` kbuild test robot
2016-11-16 10:34 ` Dan Carpenter

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=20161115182205.GA11024@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=charrer@alacritech.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liodot@gmail.com \
    --cc=sergio.paracuellos@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox