From: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
To: linuxppc-dev@ozlabs.org
Cc: imunsie@au1.ibm.com, dja@axtens.net
Subject: [PATCH] cxl: sparse: add __iomem annotations in vphb.c
Date: Wed, 28 Oct 2015 14:29:39 +1100 [thread overview]
Message-ID: <1446002979-29728-1-git-send-email-andrew.donnellan@au1.ibm.com> (raw)
sparse identifies the following issues:
drivers/misc/cxl/vphb.c:131:17: warning: incorrect type in assignment
(different address spaces)
drivers/misc/cxl/vphb.c:131:17: expected void volatile [noderef]
<asn:2>*<noident>
drivers/misc/cxl/vphb.c:131:17: got void *<noident>
drivers/misc/cxl/vphb.c:252:23: warning: incorrect type in assignment
(different address spaces)
drivers/misc/cxl/vphb.c:252:23: expected void [noderef]
<asn:2>*cfg_data
drivers/misc/cxl/vphb.c:252:23: got void *<noident>
Add __iomem annotations and remove unnecessary casts to clear up these
warnings.
Reported-by: Daniel Axtens <dja@axtens.net>
Signed-off-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
---
This patch is a respin of https://patchwork.ozlabs.org/patch/504976/,
incorporating comments from mpe.
As with the old patch, this patch doesn't make any changes to the return
type of cxl_pcie_cfg_addr() and casts to an __iomem type when we use it in
cxl_pcie_config_info(). cxl_pcie_cfg_addr() returns an unsigned long,
rather than a pointer type, as we use its return value in bitwise
operations. If there's a better way to handle this I'd like to know.
---
drivers/misc/cxl/vphb.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/misc/cxl/vphb.c b/drivers/misc/cxl/vphb.c
index c241e15..588bfc0 100644
--- a/drivers/misc/cxl/vphb.c
+++ b/drivers/misc/cxl/vphb.c
@@ -128,7 +128,7 @@ static int cxl_pcie_config_info(struct pci_bus *bus, unsigned int devfn,
return PCIBIOS_BAD_REGISTER_NUMBER;
addr = cxl_pcie_cfg_addr(phb, bus->number, devfn, offset);
- *ioaddr = (void *)(addr & ~0x3ULL);
+ *ioaddr = (void __iomem *)(addr & ~0x3ULL);
*shift = ((addr & 0x3) * 8);
switch (len) {
case 1:
@@ -249,7 +249,7 @@ int cxl_pci_vphb_add(struct cxl_afu *afu)
/* Setup the PHB using arch provided callback */
phb->ops = &cxl_pcie_pci_ops;
phb->cfg_addr = afu->afu_desc_mmio + afu->crs_offset;
- phb->cfg_data = (void *)(u64)afu->crs_len;
+ phb->cfg_data = (void __iomem *)afu->crs_len;
phb->private_data = afu;
phb->controller_ops = cxl_pci_controller_ops;
--
Andrew Donnellan Software Engineer, OzLabs
andrew.donnellan@au1.ibm.com Australia Development Lab, Canberra
+61 2 6201 8874 (work) IBM Australia Limited
next reply other threads:[~2015-10-28 3:30 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-28 3:29 Andrew Donnellan [this message]
2015-10-28 3:49 ` [PATCH] cxl: sparse: add __iomem annotations in vphb.c Ian Munsie
2015-10-30 13:07 ` Arnd Bergmann
2015-11-02 4:57 ` Andrew Donnellan
2015-11-03 9:09 ` Michael Ellerman
2015-11-04 6:17 ` Andrew Donnellan
2015-12-08 6:30 ` Andrew Donnellan
2015-12-09 1:00 ` Michael Neuling
2015-12-09 1:06 ` 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=1446002979-29728-1-git-send-email-andrew.donnellan@au1.ibm.com \
--to=andrew.donnellan@au1.ibm.com \
--cc=dja@axtens.net \
--cc=imunsie@au1.ibm.com \
--cc=linuxppc-dev@ozlabs.org \
/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;
as well as URLs for NNTP newsgroup(s).