* [PATCH] iommu/mediatek: Log with dev_err_probe when failing to parse dts
@ 2022-07-12 21:44 Nícolas F. R. A. Prado
2022-07-13 8:15 ` AngeloGioacchino Del Regno
2022-07-15 8:25 ` Joerg Roedel
0 siblings, 2 replies; 3+ messages in thread
From: Nícolas F. R. A. Prado @ 2022-07-12 21:44 UTC (permalink / raw)
To: Joerg Roedel
Cc: AngeloGioacchino Del Regno, kernel, Nícolas F. R. A. Prado,
Matthias Brugger, Will Deacon, Yong Wu, iommu, iommu,
linux-arm-kernel, linux-kernel, linux-mediatek
mtk_iommu_mm_dts_parse() can fail with EPROBE_DEFER if not all larbs
have probed yet, so use dev_err_probe() to avoid logging as an error in
that case. Also drop the return value from the message since it's
already printed by dev_err_probe(), and add the missing newline at the
end.
Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
---
drivers/iommu/mtk_iommu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c
index b2ae84046249..3d23409bf108 100644
--- a/drivers/iommu/mtk_iommu.c
+++ b/drivers/iommu/mtk_iommu.c
@@ -1214,7 +1214,7 @@ static int mtk_iommu_probe(struct platform_device *pdev)
if (MTK_IOMMU_IS_TYPE(data->plat_data, MTK_IOMMU_TYPE_MM)) {
ret = mtk_iommu_mm_dts_parse(dev, &match, data);
if (ret) {
- dev_err(dev, "mm dts parse fail(%d).", ret);
+ dev_err_probe(dev, ret, "mm dts parse fail\n");
goto out_runtime_disable;
}
} else if (MTK_IOMMU_IS_TYPE(data->plat_data, MTK_IOMMU_TYPE_INFRA)) {
--
2.37.0
_______________________________________________
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] 3+ messages in thread
* Re: [PATCH] iommu/mediatek: Log with dev_err_probe when failing to parse dts
2022-07-12 21:44 [PATCH] iommu/mediatek: Log with dev_err_probe when failing to parse dts Nícolas F. R. A. Prado
@ 2022-07-13 8:15 ` AngeloGioacchino Del Regno
2022-07-15 8:25 ` Joerg Roedel
1 sibling, 0 replies; 3+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-07-13 8:15 UTC (permalink / raw)
To: Nícolas F. R. A. Prado, Joerg Roedel
Cc: kernel, Matthias Brugger, Will Deacon, Yong Wu, iommu, iommu,
linux-arm-kernel, linux-kernel, linux-mediatek
Il 12/07/22 23:44, Nícolas F. R. A. Prado ha scritto:
> mtk_iommu_mm_dts_parse() can fail with EPROBE_DEFER if not all larbs
> have probed yet, so use dev_err_probe() to avoid logging as an error in
> that case. Also drop the return value from the message since it's
> already printed by dev_err_probe(), and add the missing newline at the
> end.
>
> Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
_______________________________________________
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] 3+ messages in thread
* Re: [PATCH] iommu/mediatek: Log with dev_err_probe when failing to parse dts
2022-07-12 21:44 [PATCH] iommu/mediatek: Log with dev_err_probe when failing to parse dts Nícolas F. R. A. Prado
2022-07-13 8:15 ` AngeloGioacchino Del Regno
@ 2022-07-15 8:25 ` Joerg Roedel
1 sibling, 0 replies; 3+ messages in thread
From: Joerg Roedel @ 2022-07-15 8:25 UTC (permalink / raw)
To: Nícolas F. R. A. Prado
Cc: AngeloGioacchino Del Regno, kernel, Matthias Brugger,
Will Deacon, Yong Wu, iommu, iommu, linux-arm-kernel,
linux-kernel, linux-mediatek
On Tue, Jul 12, 2022 at 05:44:27PM -0400, Nícolas F. R. A. Prado wrote:
> mtk_iommu_mm_dts_parse() can fail with EPROBE_DEFER if not all larbs
> have probed yet, so use dev_err_probe() to avoid logging as an error in
> that case. Also drop the return value from the message since it's
> already printed by dev_err_probe(), and add the missing newline at the
> end.
>
> Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
Applied, thanks.
_______________________________________________
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] 3+ messages in thread
end of thread, other threads:[~2022-07-15 8:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-12 21:44 [PATCH] iommu/mediatek: Log with dev_err_probe when failing to parse dts Nícolas F. R. A. Prado
2022-07-13 8:15 ` AngeloGioacchino Del Regno
2022-07-15 8:25 ` Joerg Roedel
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).