[PATCH v6 4/4] iommu/arm-smmu-nvidia: fix the warning reported by kbuild test robot
From: Krishna Reddy
Date: Thu Jun 04 2020 - 19:44:24 EST
>> drivers/iommu/arm-smmu-nvidia.c:151:33: sparse: sparse: cast removes
>> address space '<asn:2>' of expression
Reported-by: kbuild test robot <lkp@xxxxxxxxx>
Signed-off-by: Krishna Reddy <vdumpa@xxxxxxxxxx>
---
drivers/iommu/arm-smmu-nvidia.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iommu/arm-smmu-nvidia.c b/drivers/iommu/arm-smmu-nvidia.c
index 5999b6a770992..6348d8dc17fc2 100644
--- a/drivers/iommu/arm-smmu-nvidia.c
+++ b/drivers/iommu/arm-smmu-nvidia.c
@@ -248,7 +248,7 @@ struct arm_smmu_device *nvidia_smmu_impl_init(struct arm_smmu_device *smmu)
break;
nsmmu->bases[i] = devm_ioremap_resource(dev, res);
if (IS_ERR(nsmmu->bases[i]))
- return (struct arm_smmu_device *)nsmmu->bases[i];
+ return ERR_CAST(nsmmu->bases[i]);
nsmmu->num_inst++;
}
--
2.26.2