Skip to content

Commit 5f697b2

Browse files
nxpfrankliLorenzo Pieralisi
authored andcommitted
PCI: endpoint: pci-epf-vntb: Fix sparse ntb->reg build warning
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 cast in vntb_epf_peer_spad_read() and vntb_epf_peer_spad_write(). Link: https://lore.kernel.org/r/[email protected] Reported-by: kernel test robot <[email protected]> Signed-off-by: Frank Li <[email protected]> Signed-off-by: Lorenzo Pieralisi <[email protected]> Acked-by: Manivannan Sadhasivam <[email protected]>
1 parent 01dcec6 commit 5f697b2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/pci/endpoint/functions/pci-epf-vntb.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1121,7 +1121,7 @@ static u32 vntb_epf_spad_read(struct ntb_dev *ndev, int idx)
11211121
struct epf_ntb *ntb = ntb_ndev(ndev);
11221122
int off = ntb->reg->spad_offset, ct = ntb->reg->spad_count * sizeof(u32);
11231123
u32 val;
1124-
void __iomem *base = ntb->reg;
1124+
void __iomem *base = (void __iomem *)ntb->reg;
11251125

11261126
val = readl(base + off + ct + idx * sizeof(u32));
11271127
return val;
@@ -1132,7 +1132,7 @@ static int vntb_epf_spad_write(struct ntb_dev *ndev, int idx, u32 val)
11321132
struct epf_ntb *ntb = ntb_ndev(ndev);
11331133
struct epf_ntb_ctrl *ctrl = ntb->reg;
11341134
int off = ctrl->spad_offset, ct = ctrl->spad_count * sizeof(u32);
1135-
void __iomem *base = ntb->reg;
1135+
void __iomem *base = (void __iomem *)ntb->reg;
11361136

11371137
writel(val, base + off + ct + idx * sizeof(u32));
11381138
return 0;
@@ -1143,7 +1143,7 @@ static u32 vntb_epf_peer_spad_read(struct ntb_dev *ndev, int pidx, int idx)
11431143
struct epf_ntb *ntb = ntb_ndev(ndev);
11441144
struct epf_ntb_ctrl *ctrl = ntb->reg;
11451145
int off = ctrl->spad_offset;
1146-
void __iomem *base = ntb->reg;
1146+
void __iomem *base = (void __iomem *)ntb->reg;
11471147
u32 val;
11481148

11491149
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
11551155
struct epf_ntb *ntb = ntb_ndev(ndev);
11561156
struct epf_ntb_ctrl *ctrl = ntb->reg;
11571157
int off = ctrl->spad_offset;
1158-
void __iomem *base = ntb->reg;
1158+
void __iomem *base = (void __iomem *)ntb->reg;
11591159

11601160
writel(val, base + off + idx * sizeof(u32));
11611161
return 0;

0 commit comments

Comments
 (0)