Re: [PATCH v3 07/14] iommu/mediatek: simplify dt parsing error handling

From: Yong Wu (吴勇)

Date: Sat Oct 25 2025 - 05:19:01 EST


On Mon, 2025-10-20 at 06:53 +0200, Johan Hovold wrote:
> External email : Please do not click links or open attachments until
> you have verified the sender or the content.
>
>
> As previously documented by commit 26593928564c ("iommu/mediatek: Add
> error path for loop of mm_dts_parse"), the id mapping may not be
> linear
> so the whole larb array needs to be iterated on devicetree parsing
> errors.
>
> Simplify the loop by iterating from index zero while dropping the
> redundant NULL check for consistency with later cleanups.
>
> Also add back the comment which was removed by commit 462e768b55a2
> ("iommu/mediatek: Fix forever loop in error handling") to prevent
> anyone
> from trying to optimise the loop by iterating backwards from 'i'.
>
> Cc: Yong Wu <yong.wu@xxxxxxxxxxxx>
> Acked-by: Robin Murphy <robin.murphy@xxxxxxx>
> Signed-off-by: Johan Hovold <johan@xxxxxxxxxx>

Reviewed-by: Yong Wu <yong.wu@xxxxxxxxxxxx>