[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <dd1b7ca0-ef9f-4b9d-bca1-8a72c22231bb@arm.com>
Date: Thu, 13 Feb 2025 11:30:35 +0000
From: Robin Murphy <robin.murphy@....com>
To: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>,
Joerg Roedel <joro@...tes.org>, Will Deacon <will@...nel.org>
Cc: iommu@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: Re: [PATCH RESEND 2/3] iommu: omap: Simplify returning syscon PTR_ERR
On 2025-02-12 8:19 pm, Krzysztof Kozlowski wrote:
> No need to store PTR_ERR into temporary, local 'ret' variable.
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
> ---
> drivers/iommu/omap-iommu.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/iommu/omap-iommu.c b/drivers/iommu/omap-iommu.c
> index 04a7deaaba25cb270eb6eeaf6a21030440f78a5e..bce27805805010ae473aa8dbd9e0cb903dd79bba 100644
> --- a/drivers/iommu/omap-iommu.c
> +++ b/drivers/iommu/omap-iommu.c
> @@ -1123,7 +1123,6 @@ static int omap_iommu_dra7_get_dsp_system_cfg(struct platform_device *pdev,
> struct omap_iommu *obj)
> {
> struct device_node *np = pdev->dev.of_node;
> - int ret;
>
> if (!of_device_is_compatible(np, "ti,dra7-dsp-iommu"))
> return 0;
> @@ -1132,8 +1131,7 @@ static int omap_iommu_dra7_get_dsp_system_cfg(struct platform_device *pdev,
> syscon_regmap_lookup_by_phandle(np, "ti,syscon-mmuconfig");
> if (IS_ERR(obj->syscfg)) {
> /* can fail with -EPROBE_DEFER */
This comment is no longer correct or useful, since it's alluding to the
check which you removed in the previous patch. I'd just clean up the
whole lot in patch #1 as it's all closely related, and also turn this
return into a dev_err_probe() to capture the spirit of the other errors
being replaced, perhaps something like "No valid ti,syscon-mmuconfig
available" - that way it adds some value for debugging probe deferral
issues more than broken DTs.
Thanks,
Robin.
> - ret = PTR_ERR(obj->syscfg);
> - return ret;
> + return PTR_ERR(obj->syscfg);
> }
>
> if (of_property_read_u32_index(np, "ti,syscon-mmuconfig", 1,
>
Powered by blists - more mailing lists