mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Yong Wu (吴勇)" <Yong.Wu@mediatek.com>
To: "joro@8bytes.org" <joro@8bytes.org>,
	"will@kernel.org" <will@kernel.org>,
	"johan@kernel.org" <johan@kernel.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"j@jannau.net" <j@jannau.net>,
	"vdumpa@nvidia.com" <vdumpa@nvidia.com>,
	"robin.murphy@arm.com" <robin.murphy@arm.com>,
	"m.szyprowski@samsung.com" <m.szyprowski@samsung.com>,
	"wens@csie.org" <wens@csie.org>,
	"thierry.reding@gmail.com" <thierry.reding@gmail.com>,
	"iommu@lists.linux.dev" <iommu@lists.linux.dev>,
	"matthias.bgg@gmail.com" <matthias.bgg@gmail.com>,
	"robin.clark@oss.qualcomm.com" <robin.clark@oss.qualcomm.com>,
	"sven@kernel.org" <sven@kernel.org>,
	AngeloGioacchino Del Regno
	<angelogioacchino.delregno@collabora.com>
Subject: Re: [PATCH v3 07/14] iommu/mediatek: simplify dt parsing error handling
Date: Sat, 25 Oct 2025 09:18:34 +0000	[thread overview]
Message-ID: <7f00d364a5b07ca23f9b5def42df8ab70bb06cfb.camel@mediatek.com> (raw)
In-Reply-To: <20251020045318.30690-8-johan@kernel.org>

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@mediatek.com>
> Acked-by: Robin Murphy <robin.murphy@arm.com>
> Signed-off-by: Johan Hovold <johan@kernel.org>

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


  parent reply	other threads:[~2025-10-25  9:18 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-20  4:53 [PATCH v3 00/14] iommu: fix device leaks Johan Hovold
2025-10-20  4:53 ` [PATCH v3 01/14] iommu/apple-dart: fix device leak on of_xlate() Johan Hovold
2025-10-20  4:53 ` [PATCH v3 02/14] iommu/qcom: " Johan Hovold
2025-10-20  4:53 ` [PATCH v3 03/14] iommu/exynos: " Johan Hovold
2025-10-20  4:53 ` [PATCH v3 04/14] iommu/ipmmu-vmsa: " Johan Hovold
2025-10-20  4:53 ` [PATCH v3 05/14] iommu/mediatek: " Johan Hovold
2025-10-20 10:35   ` AngeloGioacchino Del Regno
2025-10-20  4:53 ` [PATCH v3 06/14] iommu/mediatek: fix use-after-free on probe deferral Johan Hovold
2025-10-20 10:35   ` AngeloGioacchino Del Regno
2025-10-25  9:18   ` Yong Wu (吴勇)
2025-10-20  4:53 ` [PATCH v3 07/14] iommu/mediatek: simplify dt parsing error handling Johan Hovold
2025-10-20 10:35   ` AngeloGioacchino Del Regno
2025-10-25  9:18   ` Yong Wu (吴勇) [this message]
2025-10-20  4:53 ` [PATCH v3 08/14] iommu/mediatek-v1: fix device leak on probe_device() Johan Hovold
2025-10-20 10:35   ` AngeloGioacchino Del Regno
2025-10-20  4:53 ` [PATCH v3 09/14] iommu/mediatek-v1: fix device leaks on probe() Johan Hovold
2025-10-20 10:35   ` AngeloGioacchino Del Regno
2025-10-20  4:53 ` [PATCH v3 10/14] iommu/mediatek-v1: add missing larb count sanity check Johan Hovold
2025-10-20 10:35   ` AngeloGioacchino Del Regno
2025-10-20  4:53 ` [PATCH v3 11/14] iommu/omap: fix device leaks on probe_device() Johan Hovold
2025-10-20  4:53 ` [PATCH v3 12/14] iommu/omap: simplify probe_device() error handling Johan Hovold
2025-10-20  4:53 ` [PATCH v3 13/14] iommu/sun50i: fix device leak on of_xlate() Johan Hovold
2025-10-20  4:53 ` [PATCH v3 14/14] iommu/tegra: fix device leak on probe_device() Johan Hovold
2025-11-10  9:14 ` [PATCH v3 00/14] iommu: fix device leaks Johan Hovold
2025-11-17  9:05 ` Joerg Roedel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7f00d364a5b07ca23f9b5def42df8ab70bb06cfb.camel@mediatek.com \
    --to=yong.wu@mediatek.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=iommu@lists.linux.dev \
    --cc=j@jannau.net \
    --cc=johan@kernel.org \
    --cc=joro@8bytes.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=matthias.bgg@gmail.com \
    --cc=robin.clark@oss.qualcomm.com \
    --cc=robin.murphy@arm.com \
    --cc=sven@kernel.org \
    --cc=thierry.reding@gmail.com \
    --cc=vdumpa@nvidia.com \
    --cc=wens@csie.org \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®