* [PATCH] iommu/arm-smmu-v3: move error checking into common path
@ 2020-03-31 13:59 luanshi
2020-03-31 14:19 ` Robin Murphy
0 siblings, 1 reply; 2+ messages in thread
From: luanshi @ 2020-03-31 13:59 UTC (permalink / raw)
To: Will Deacon, Robin Murphy, Joerg Roedel
Cc: iommu, linux-kernel, linux-arm-kernel
Move error checking into common path to be consistent with
drivers/iommu/arm-smmu.c.
Signed-off-by: Liguang Zhang <zhangliguang@linux.alibaba.com>
---
drivers/iommu/arm-smmu-v3.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/iommu/arm-smmu-v3.c b/drivers/iommu/arm-smmu-v3.c
index aa3ac2a..970f1c9 100644
--- a/drivers/iommu/arm-smmu-v3.c
+++ b/drivers/iommu/arm-smmu-v3.c
@@ -3889,13 +3889,13 @@ static int arm_smmu_device_probe(struct platform_device *pdev)
}
smmu->dev = dev;
- if (dev->of_node) {
+ if (dev->of_node)
ret = arm_smmu_device_dt_probe(pdev, smmu);
- } else {
+ else
ret = arm_smmu_device_acpi_probe(pdev, smmu);
- if (ret == -ENODEV)
- return ret;
- }
+
+ if (ret)
+ return ret;
/* Set bypass mode according to firmware probing result */
bypass = !!ret;
--
1.8.3.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] iommu/arm-smmu-v3: move error checking into common path
2020-03-31 13:59 [PATCH] iommu/arm-smmu-v3: move error checking into common path luanshi
@ 2020-03-31 14:19 ` Robin Murphy
0 siblings, 0 replies; 2+ messages in thread
From: Robin Murphy @ 2020-03-31 14:19 UTC (permalink / raw)
To: luanshi, Will Deacon, Joerg Roedel; +Cc: iommu, linux-kernel, linux-arm-kernel
On 2020-03-31 2:59 pm, luanshi wrote:
> Move error checking into common path to be consistent with
> drivers/iommu/arm-smmu.c.
>
> Signed-off-by: Liguang Zhang <zhangliguang@linux.alibaba.com>
> ---
> drivers/iommu/arm-smmu-v3.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/iommu/arm-smmu-v3.c b/drivers/iommu/arm-smmu-v3.c
> index aa3ac2a..970f1c9 100644
> --- a/drivers/iommu/arm-smmu-v3.c
> +++ b/drivers/iommu/arm-smmu-v3.c
> @@ -3889,13 +3889,13 @@ static int arm_smmu_device_probe(struct platform_device *pdev)
> }
> smmu->dev = dev;
>
> - if (dev->of_node) {
> + if (dev->of_node)
> ret = arm_smmu_device_dt_probe(pdev, smmu);
> - } else {
> + else
> ret = arm_smmu_device_acpi_probe(pdev, smmu);
> - if (ret == -ENODEV)
> - return ret;
> - }
> +
> + if (ret)
> + return ret;
This completely changes the flow WRT the bypass decision below, so
without a clear justification of why that's OK, NAK.
Robin.
>
> /* Set bypass mode according to firmware probing result */
> bypass = !!ret;
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-03-31 16:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-31 13:59 [PATCH] iommu/arm-smmu-v3: move error checking into common path luanshi
2020-03-31 14:19 ` Robin Murphy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).