Re: [PATCH v4 5/8] iommu/arm-smmu-v3: Refactor write_ctx_desc

From: Nicolin Chen
Date: Fri Aug 04 2023 - 16:22:59 EST

On Thu, Aug 03, 2023 at 12:32:33AM +0800, Michael Shavit wrote:

> - ret = arm_smmu_write_ctx_desc(smmu_domain, mm->pasid, cd);
> - if (ret)
> + ret = arm_smmu_write_ctx_desc_devices(smmu_domain, mm->pasid, cd);
> + if (ret) {
> + arm_smmu_write_ctx_desc_devices(smmu_domain, mm->pasid, NULL);
> goto err_put_notifier;

There are a couple of places calling this helper but they don't
check the return code. Not sure if they should check too and do
a fallback like this: if so, this fallback can be squashed into
the helper; otherwise, this should be fine. Anyway, if there is
a need of change for those, it would need another patch I think.

Reviewed-by: Nicolin Chen <nicolinc@xxxxxxxxxx>