Content-Type: multipart/mixed; boundary="===============5493796100050374763==" MIME-Version: 1.0 From: John Garry To: kbuild-all@lists.01.org Subject: Re: [PATCH v4 6/6] dma-iommu: Pass iova len for IOVA domain init Date: Mon, 19 Jul 2021 11:45:28 +0100 Message-ID: In-Reply-To: <157833d9-e074-125d-1a7c-f9ef4c05b763@arm.com> List-Id: --===============5493796100050374763== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable On 19/07/2021 10:32, Robin Murphy wrote: >>> 7c1b058c8b5a31 Robin Murphy=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 2017-03-16=C2=A0 393=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if (!dev) >>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ^^^^ >>> Old code has checks for NULL >>> >> >> I doubt that in practice we need this check. >> >> Function iommu_dma_init_domain() is only called by = >> iommu_setup_dma_ops(). Furthermore, iommu_setup_dma_ops() calls = >> iommu_get_domain_for_dev(dev), which cannot safely handle dev =3D=3D NUL= L = >> for when we call iommu_dma_init_domain() there. As such, the dev =3D=3D = >> NULL checks in iommu_dma_init_domain() are effectively redundant. > = > Indeed, I have a patch for that in the stack I'm preparing: > = > https://gitlab.arm.com/linux-arm/linux-rm/-/commit/9b6cf2a214107c153ee278= b1664f688888d7328f Cool, so how about please checking this series when you get a chance? = You did suggest this approach after all.. Thanks, John --===============5493796100050374763==--