Message ID | 1470111037-18531-6-git-send-email-gwshan@linux.vnet.ibm.com (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show |
diff --git a/arch/powerpc/platforms/powernv/pci.c b/arch/powerpc/platforms/powernv/pci.c index b32bafb..9a26a57 100644 --- a/arch/powerpc/platforms/powernv/pci.c +++ b/arch/powerpc/platforms/powernv/pci.c @@ -758,7 +758,7 @@ void pnv_tce_free(struct iommu_table *tbl, long index, long npages) unsigned long pnv_tce_get(struct iommu_table *tbl, long index) { - return *(pnv_tce(tbl, index - tbl->it_offset)); + return (__force unsigned long)(*(pnv_tce(tbl, index - tbl->it_offset))); } struct iommu_table *pnv_pci_table_alloc(int nid)
This fixes the warning reported from sparse: gwshan@gwshan:~/sandbox/l$ make C=2 CF=-D__CHECK_ENDIAN__ \ arch/powerpc/platforms/powernv/pci.o : arch/powerpc/platforms/powernv/pci.c:761:16: \ warning: incorrect type in return expression (different base types) arch/powerpc/platforms/powernv/pci.c:761:16: \ expected unsigned long arch/powerpc/platforms/powernv/pci.c:761:16: \ got restricted __be64 [usertype] <noident> Cc: Alexey Kardashevskiy <aik@ozlabs.ru> Fixes: c5bb44edee19 ("powerpc/powernv: Implement accessor to TCE entry") Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> --- arch/powerpc/platforms/powernv/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)