Skip to content

Commit 12a48fe

Browse files
jgunthorpewilldeacon
authored andcommitted
iommu/arm-smmu-v3: Master cannot be NULL in arm_smmu_write_strtab_ent()
The only caller is arm_smmu_install_ste_for_dev() which never has a NULL master. Remove the confusing if. Reviewed-by: Moritz Fischer <mdf@kernel.org> Reviewed-by: Michael Shavit <mshavit@google.com> Reviewed-by: Eric Auger <eric.auger@redhat.com> Reviewed-by: Nicolin Chen <nicolinc@nvidia.com> Tested-by: Shameer Kolothum <shameerali.kolothum.thodi@huawei.com> Tested-by: Nicolin Chen <nicolinc@nvidia.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com> Signed-off-by: Will Deacon <will@kernel.org>
1 parent 57b8904 commit 12a48fe

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

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

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1272,22 +1272,17 @@ static void arm_smmu_write_strtab_ent(struct arm_smmu_master *master, u32 sid,
12721272
*/
12731273
u64 val = le64_to_cpu(dst->data[0]);
12741274
bool ste_live = false;
1275-
struct arm_smmu_device *smmu = NULL;
1275+
struct arm_smmu_device *smmu = master->smmu;
12761276
struct arm_smmu_ctx_desc_cfg *cd_table = NULL;
12771277
struct arm_smmu_s2_cfg *s2_cfg = NULL;
1278-
struct arm_smmu_domain *smmu_domain = NULL;
1278+
struct arm_smmu_domain *smmu_domain = master->domain;
12791279
struct arm_smmu_cmdq_ent prefetch_cmd = {
12801280
.opcode = CMDQ_OP_PREFETCH_CFG,
12811281
.prefetch = {
12821282
.sid = sid,
12831283
},
12841284
};
12851285

1286-
if (master) {
1287-
smmu_domain = master->domain;
1288-
smmu = master->smmu;
1289-
}
1290-
12911286
if (smmu_domain) {
12921287
switch (smmu_domain->stage) {
12931288
case ARM_SMMU_DOMAIN_S1:

0 commit comments

Comments
 (0)