From 458ed8c91629145d4ba4dc54e11641ecee0c38f3 Mon Sep 17 00:00:00 2001 From: "Isaac J. Manjarres" Date: Wed, 29 Apr 2020 00:25:12 -0700 Subject: [PATCH] iommu/arm-smmu: Fix tbu_ids type in qsmmuv500_tlb_sync_timeout() qsmmuv500_tlb_sync_timeout() uses for_each_set_bit() to iterate through the TBU IDs. However, for_each_set_bit() operates on unsigned longs, while tbu_ids is a u32 variable. Change the type of tbu_ids to unsigned long. Change-Id: If59eedebb21d388f864a0e2579f8af6bb1fc0b75 Signed-off-by: Isaac J. Manjarres --- drivers/iommu/arm-smmu-qcom.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/iommu/arm-smmu-qcom.c b/drivers/iommu/arm-smmu-qcom.c index 4abd434f9dee..fb4595c0dd02 100644 --- a/drivers/iommu/arm-smmu-qcom.c +++ b/drivers/iommu/arm-smmu-qcom.c @@ -243,7 +243,7 @@ static void qsmmuv500_tlb_sync_timeout(struct arm_smmu_device *smmu) u32 tbu_inv_pending = 0, tbu_sync_pending = 0; u32 tbu_inv_acked = 0, tbu_sync_acked = 0; u32 tcu_inv_pending = 0, tcu_sync_pending = 0; - u32 tbu_ids = 0; + unsigned long tbu_ids = 0; struct qsmmuv500_archdata *data = to_qsmmuv500_archdata(smmu); int ret; @@ -304,8 +304,8 @@ static void qsmmuv500_tlb_sync_timeout(struct arm_smmu_device *smmu) tcu_inv_pending?"pending":"completed", tcu_sync_pending?"pending":"completed"); - for_each_set_bit(tbu_id, (unsigned long *) &tbu_ids, - sizeof(tbu_ids) * BITS_PER_BYTE) { + for_each_set_bit(tbu_id, &tbu_ids, sizeof(tbu_ids) * + BITS_PER_BYTE) { struct qsmmuv500_tbu_device *tbu;