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

From: Michael Shavit
Date: Mon Aug 07 2023 - 08:27:28 EST


On Sat, Aug 5, 2023 at 4:22 AM Nicolin Chen <nicolinc@xxxxxxxxxx> wrote:
>
> 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.

Yeah noticed that too; I think those other calls are technically OK
because the call can't fail when writing to a CD entry that was
previously written (it can only fail on allocation of a leaf table).
It's also not obvious how those callers could gracefully handle this.
I'd prefer keeping this commit as close to the existing behavior as
possible.