Skip to content

Commit 445d7a8

Browse files
Bibek Kumar Patrowilldeacon
authored andcommitted
iommu/arm-smmu: Refactor qcom_smmu structure to include single pointer
qcom_smmu_match_data is static and constant so refactor qcom_smmu to store single pointer to qcom_smmu_match_data instead of replicating multiple child members of the same and handle the further dereferences in the places that want them. Suggested-by: Robin Murphy <[email protected]> Reviewed-by: Dmitry Baryshkov <[email protected]> Reviewed-by: Rob Clark <[email protected]> Signed-off-by: Bibek Kumar Patro <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Will Deacon <[email protected]>
1 parent ef4144b commit 445d7a8

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

drivers/iommu/arm/arm-smmu/arm-smmu-qcom-debug.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ void qcom_smmu_tlb_sync_debug(struct arm_smmu_device *smmu)
7373
if (__ratelimit(&rs)) {
7474
dev_err(smmu->dev, "TLB sync timed out -- SMMU may be deadlocked\n");
7575

76-
cfg = qsmmu->cfg;
76+
cfg = qsmmu->data->cfg;
7777
if (!cfg)
7878
return;
7979

drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ static struct arm_smmu_device *qcom_smmu_create(struct arm_smmu_device *smmu,
507507
return ERR_PTR(-ENOMEM);
508508

509509
qsmmu->smmu.impl = impl;
510-
qsmmu->cfg = data->cfg;
510+
qsmmu->data = data;
511511

512512
return &qsmmu->smmu;
513513
}

drivers/iommu/arm/arm-smmu/arm-smmu-qcom.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
struct qcom_smmu {
1010
struct arm_smmu_device smmu;
11-
const struct qcom_smmu_config *cfg;
11+
const struct qcom_smmu_match_data *data;
1212
bool bypass_quirk;
1313
u8 bypass_cbndx;
1414
u32 stall_enabled;

0 commit comments

Comments
 (0)