From: Frank Li <Frank.Li@nxp.com>
To: mani@kernel.org
Cc: Frank.Li@nxp.com, allenbh@gmail.com, bhelgaas@google.com,
dave.jiang@intel.com, helgaas@kernel.org, imx@lists.linux.dev,
jdmason@kudzu.us, kw@linux.com, linux-kernel@vger.kernel.org,
linux-pci@vger.kernel.org, lpieralisi@kernel.org,
ntb@lists.linux.dev
Subject: [PATCH v16 7/7] PCI: endpoint: pci-epf-vntb: fix sparse build warning at ntb->reg
Date: Wed, 2 Nov 2022 10:10:14 -0400 [thread overview]
Message-ID: <20221102141014.1025893-8-Frank.Li@nxp.com> (raw)
In-Reply-To: <20221102141014.1025893-1-Frank.Li@nxp.com>
From: Frank Li <frank.li@nxp.com>
pci-epf-vntb.c:1128:33: sparse: expected void [noderef] __iomem *base
pci-epf-vntb.c:1128:33: sparse: got struct epf_ntb_ctrl *reg
Add __iomem type convert in vntb_epf_peer_spad_read() and
vntb_epf_peer_spad_write().
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Frank Li <frank.li@nxp.com>
Acked-by: Manivannan Sadhasivam <mani@kernel.org>
---
drivers/pci/endpoint/functions/pci-epf-vntb.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/pci/endpoint/functions/pci-epf-vntb.c b/drivers/pci/endpoint/functions/pci-epf-vntb.c
index f896846ed970..04698e7995a5 100644
--- a/drivers/pci/endpoint/functions/pci-epf-vntb.c
+++ b/drivers/pci/endpoint/functions/pci-epf-vntb.c
@@ -1121,7 +1121,7 @@ static u32 vntb_epf_spad_read(struct ntb_dev *ndev, int idx)
struct epf_ntb *ntb = ntb_ndev(ndev);
int off = ntb->reg->spad_offset, ct = ntb->reg->spad_count * sizeof(u32);
u32 val;
- void __iomem *base = ntb->reg;
+ void __iomem *base = (void __iomem *)ntb->reg;
val = readl(base + off + ct + idx * sizeof(u32));
return val;
@@ -1132,7 +1132,7 @@ static int vntb_epf_spad_write(struct ntb_dev *ndev, int idx, u32 val)
struct epf_ntb *ntb = ntb_ndev(ndev);
struct epf_ntb_ctrl *ctrl = ntb->reg;
int off = ctrl->spad_offset, ct = ctrl->spad_count * sizeof(u32);
- void __iomem *base = ntb->reg;
+ void __iomem *base = (void __iomem *)ntb->reg;
writel(val, base + off + ct + idx * sizeof(u32));
return 0;
@@ -1143,7 +1143,7 @@ static u32 vntb_epf_peer_spad_read(struct ntb_dev *ndev, int pidx, int idx)
struct epf_ntb *ntb = ntb_ndev(ndev);
struct epf_ntb_ctrl *ctrl = ntb->reg;
int off = ctrl->spad_offset;
- void __iomem *base = ntb->reg;
+ void __iomem *base = (void __iomem *)ntb->reg;
u32 val;
val = readl(base + off + idx * sizeof(u32));
@@ -1155,7 +1155,7 @@ static int vntb_epf_peer_spad_write(struct ntb_dev *ndev, int pidx, int idx, u32
struct epf_ntb *ntb = ntb_ndev(ndev);
struct epf_ntb_ctrl *ctrl = ntb->reg;
int off = ctrl->spad_offset;
- void __iomem *base = ntb->reg;
+ void __iomem *base = (void __iomem *)ntb->reg;
writel(val, base + off + idx * sizeof(u32));
return 0;
--
2.34.1
next prev parent reply other threads:[~2022-11-02 14:11 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-02 14:10 [PATCH v16 0/7] pci-epf-vntb clean up Frank Li
2022-11-02 14:10 ` [PATCH v16 1/7] PCI: endpoint: pci-epf-vntb: clean up kernel_doc warning Frank Li
2022-11-02 14:10 ` [PATCH v16 2/7] PCI: endpoint: pci-epf-vntb: fix indentation of the struct epf_ntb_ctrl Frank Li
2022-11-02 14:10 ` [PATCH v16 3/7] PCI: endpoint: pci-epf-vntb: fix call pci_epc_mem_free_addr() at err path Frank Li
2022-11-02 14:10 ` [PATCH v16 4/7] PCI: endpoint: pci-epf-vntb: remove unused field epf_db_phy Frank Li
2022-11-10 15:28 ` Lorenzo Pieralisi
2022-11-11 2:39 ` [EXT] " Frank Li
2022-11-11 10:55 ` Lorenzo Pieralisi
2022-11-15 20:49 ` Frank Li
2022-11-02 14:10 ` [PATCH v16 5/7] PCI: endpoint: pci-epf-vntb: replace hardcode 4 with sizeof(u32) Frank Li
2022-11-02 14:10 ` [PATCH v16 6/7] PCI: endpoint: pci-epf-vntb: fix sparse build warning at epf_db Frank Li
2022-11-02 14:10 ` Frank Li [this message]
2022-12-14 0:26 ` [PATCH v16 7/7] PCI: endpoint: pci-epf-vntb: fix sparse build warning at ntb->reg Bjorn Helgaas
2022-12-14 0:49 ` [EXT] " Frank Li
2022-12-14 11:35 ` Bjorn Helgaas
2022-12-14 15:24 ` Frank Li
2022-11-02 23:03 ` [PATCH v16 0/7] pci-epf-vntb clean up Bjorn Helgaas
2022-11-03 0:59 ` [EXT] " Frank Li
2022-11-23 17:11 ` Lorenzo Pieralisi
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=20221102141014.1025893-8-Frank.Li@nxp.com \
--to=frank.li@nxp.com \
--cc=allenbh@gmail.com \
--cc=bhelgaas@google.com \
--cc=dave.jiang@intel.com \
--cc=helgaas@kernel.org \
--cc=imx@lists.linux.dev \
--cc=jdmason@kudzu.us \
--cc=kw@linux.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lpieralisi@kernel.org \
--cc=mani@kernel.org \
--cc=ntb@lists.linux.dev \
/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).