[PATCH 4/4] memory: tegra-mc: Use %pe format

Krzysztof Kozlowski posted 4 patches 1 month, 1 week ago
[PATCH 4/4] memory: tegra-mc: Use %pe format
Posted by Krzysztof Kozlowski 1 month, 1 week ago
Make code printing pointer error value a bit simpler and fix coccinelle
suggestion:

  tegra/mc.c:975:4-11: WARNING: Consider using %pe to print PTR_ERR()

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
---
 drivers/memory/tegra/mc.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/memory/tegra/mc.c b/drivers/memory/tegra/mc.c
index 1dc516a5be14..67a0b0c07712 100644
--- a/drivers/memory/tegra/mc.c
+++ b/drivers/memory/tegra/mc.c
@@ -962,8 +962,7 @@ static int tegra_mc_probe(struct platform_device *pdev)
 	if (IS_ENABLED(CONFIG_TEGRA_IOMMU_SMMU) && mc->soc->smmu) {
 		mc->smmu = tegra_smmu_probe(&pdev->dev, mc->soc->smmu, mc);
 		if (IS_ERR(mc->smmu)) {
-			dev_err(&pdev->dev, "failed to probe SMMU: %ld\n",
-				PTR_ERR(mc->smmu));
+			dev_err(&pdev->dev, "failed to probe SMMU: %pe\n", mc->smmu);
 			mc->smmu = NULL;
 		}
 	}

-- 
2.51.0
Re: [PATCH 4/4] memory: tegra-mc: Use %pe format
Posted by Thierry Reding 1 month, 1 week ago
On Thu, Feb 26, 2026 at 09:35:27PM +0100, Krzysztof Kozlowski wrote:
> Make code printing pointer error value a bit simpler and fix coccinelle
> suggestion:
> 
>   tegra/mc.c:975:4-11: WARNING: Consider using %pe to print PTR_ERR()
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
> ---
>  drivers/memory/tegra/mc.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)

Acked-by: Thierry Reding <treding@nvidia.com>