public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Michael Neuling <mikey@neuling•org>
To: Daniel Axtens <dja@axtens•net>
Cc: linuxppc-dev@ozlabs•org, mpe@ellerman•id.au,
	benh@kernel•crashing.org, imunsie@au•ibm.com
Subject: Re: [PATCH 3/4] cxl: sparse: Flag iomem pointers properly
Date: Fri, 07 Aug 2015 14:13:10 +1000	[thread overview]
Message-ID: <1438920790.16275.2.camel@neuling.org> (raw)
In-Reply-To: <1438917500-12100-3-git-send-email-dja@axtens.net>

On Fri, 2015-08-07 at 13:18 +1000, Daniel Axtens wrote:
> Sparse identifies the following address space issues:
> /scratch/dja/linux-capi/drivers/misc/cxl/vphb.c:125:17: warning: incorrec=
t type in assignment (different address spaces)
> /scratch/dja/linux-capi/drivers/misc/cxl/vphb.c:125:17:    expected void =
volatile [noderef] <asn:2>*<noident>
> /scratch/dja/linux-capi/drivers/misc/cxl/vphb.c:125:17:    got void *<noi=
dent>
> /scratch/dja/linux-capi/drivers/misc/cxl/vphb.c:220:23: warning: incorrec=
t type in assignment (different address spaces)
> /scratch/dja/linux-capi/drivers/misc/cxl/vphb.c:220:23:    expected void =
[noderef] <asn:2>*cfg_data
> /scratch/dja/linux-capi/drivers/misc/cxl/vphb.c:220:23:    got void *<noi=
dent>
>=20
> Fix those by flagging __iomem in the relevant casts.
>=20
> Signed-off-by: Daniel Axtens <dja@axtens•net>

Acked-by: Michael Neuling <mikey@neuling•org>

> ---
>  drivers/misc/cxl/vphb.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>=20
> diff --git a/drivers/misc/cxl/vphb.c b/drivers/misc/cxl/vphb.c
> index 2eba002b580b..a7b55772a91c 100644
> --- a/drivers/misc/cxl/vphb.c
> +++ b/drivers/misc/cxl/vphb.c
> @@ -122,7 +122,7 @@ static int cxl_pcie_config_info(struct pci_bus *bus, =
unsigned int devfn,
>  		return PCIBIOS_BAD_REGISTER_NUMBER;
>  	addr =3D cxl_pcie_cfg_addr(phb, bus->number, devfn, offset);
> =20
> -	*ioaddr =3D (void *)(addr & ~0x3ULL);
> +	*ioaddr =3D (void __iomem *)(addr & ~0x3ULL);
>  	*shift =3D ((addr & 0x3) * 8);
>  	switch (len) {
>  	case 1:
> @@ -217,7 +217,7 @@ int cxl_pci_vphb_add(struct cxl_afu *afu)
>  	/* Setup the PHB using arch provided callback */
>  	phb->ops =3D &cxl_pcie_pci_ops;
>  	phb->cfg_addr =3D afu->afu_desc_mmio + afu->crs_offset;
> -	phb->cfg_data =3D (void *)(u64)afu->crs_len;
> +	phb->cfg_data =3D (void __iomem *)(u64)afu->crs_len;
>  	phb->private_data =3D afu;
>  	phb->controller_ops =3D cxl_pci_controller_ops;
> =20

  reply	other threads:[~2015-08-07  4:13 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-07  3:18 [PATCH 1/4] cxl: Compile with -Werror Daniel Axtens
2015-08-07  3:18 ` [PATCH 2/4] cxl: sparse: Make declarations static Daniel Axtens
2015-08-07  5:48   ` Michael Neuling
2015-08-13  1:44   ` [2/4] " Michael Ellerman
2015-08-07  3:18 ` [PATCH 3/4] cxl: sparse: Flag iomem pointers properly Daniel Axtens
2015-08-07  4:13   ` Michael Neuling [this message]
2015-08-12  3:19   ` [3/4] " Michael Ellerman
2015-08-07  3:18 ` [PATCH 4/4] cxl: sparse: Silence iomem warning in debugfs file creation Daniel Axtens
2015-08-07  4:13   ` Michael Neuling
2015-08-13  1:44   ` [4/4] " Michael Ellerman
2015-08-07  3:25 ` [PATCH 1/4] cxl: Compile with -Werror Michael Neuling
2015-08-07  3:26   ` Daniel Axtens
2015-08-07  4:13 ` Michael Neuling
2015-08-13  1:44 ` [1/4] " Michael Ellerman

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=1438920790.16275.2.camel@neuling.org \
    --to=mikey@neuling$(echo .)org \
    --cc=benh@kernel$(echo .)crashing.org \
    --cc=dja@axtens$(echo .)net \
    --cc=imunsie@au$(echo .)ibm.com \
    --cc=linuxppc-dev@ozlabs$(echo .)org \
    --cc=mpe@ellerman$(echo .)id.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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