This fixes warning reported from sparse:

  gwshan@gwshan:~/sandbox/l$ make C=2 CF=-D__CHECK_ENDIAN__ \
                             arch/powerpc/platforms/powernv/pci-ioda.o
        :
  arch/powerpc/platforms/powernv/pci-ioda.c:451:49: \
  warning: incorrect type in argument 2 (different base types)
  arch/powerpc/platforms/powernv/pci-ioda.c:451:49: \
  expected restricted __be32 const [usertype] *addr
  arch/powerpc/platforms/powernv/pci-ioda.c:451:49: \
  got unsigned int const [usertype] *
  arch/powerpc/platforms/powernv/pci-ioda.c:452:50: \
  warning: incorrect type in argument 1 (different base types)
  arch/powerpc/platforms/powernv/pci-ioda.c:452:50: \
  expected restricted __be32 const [usertype] *cell
  arch/powerpc/platforms/powernv/pci-ioda.c:452:50: \
  got unsigned int const [usertype] *
  arch/powerpc/platforms/powernv/pci-ioda.c:454:35: \
  warning: incorrect type in argument 1 (different base types)
  arch/powerpc/platforms/powernv/pci-ioda.c:454:35: \
  expected restricted __be32 const [usertype] *cell
  arch/powerpc/platforms/powernv/pci-ioda.c:454:35: \
  got unsigned int const [usertype] *[assigned] r

Fixes: 262af557dd75 ("powerpc/powernv: Enable M64 aperatus for PHB3")
Signed-off-by: Gavin Shan <gws...@linux.vnet.ibm.com>
---
 arch/powerpc/platforms/powernv/pci-ioda.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c 
b/arch/powerpc/platforms/powernv/pci-ioda.c
index 891fc4a..ac60190 100644
--- a/arch/powerpc/platforms/powernv/pci-ioda.c
+++ b/arch/powerpc/platforms/powernv/pci-ioda.c
@@ -402,7 +402,7 @@ static void __init pnv_ioda_parse_m64_window(struct pnv_phb 
*phb)
        struct device_node *dn = hose->dn;
        struct resource *res;
        u32 m64_range[2], i;
-       const u32 *r;
+       const __be32 *r;
        u64 pci_addr;
 
        if (phb->type != PNV_PHB_IODA1 && phb->type != PNV_PHB_IODA2) {
-- 
2.1.0

_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Reply via email to