Skip to contentSkip to conversation

soc: qcom: smem: Silence probe defer error

PATCH In review Stephen Boyd 3 participants 3 messages Jul 1, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 soc: qcom: smem: Silence probe defer error

If we fail to get the hwspinlock due to probe defer, we shouldn't print an error message. Just be silent in this case.

Cc Bjorn Andersson <[email protected]>
---
 drivers/soc/qcom/smem.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/soc/qcom/smem.c +2 -1
index 2e1aa9f130f4..18ec52f2078a 100644
@@ -740,7 +740,8 @@ static int qcom_smem_probe(struct platform_device *pdev)
 
 	hwlock_id = of_hwspin_lock_get_id(pdev->dev.of_node, 0);
 	if (hwlock_id < 0) {
-		dev_err(&pdev->dev, "failed to retrieve hwlock\n");
+		if (hwlock_id != -EPROBE_DEFER)
+			dev_err(&pdev->dev, "failed to retrieve hwlock\n");
 		return hwlock_id;
 	}
 
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
#1 lore raw
Quoted 5 lines · Stephen Boyd

If we fail to get the hwspinlock due to probe defer, we shouldn't print an error message. Just be silent in this case.

Cc Bjorn Andersson <[email protected]>

Looks good to me. This has needed to be fixed for a while. Thanks!

Andy

Reviewed-by on v1 1/1
#2 lore raw
In reply to Stephen Boyd
Quoted 3 lines · Stephen Boyd

If we fail to get the hwspinlock due to probe defer, we shouldn't print an error message. Just be silent in this case.

This generally seems to result in a large pile of drivers ending up on the probe deferr list, so something we should try to avoid.

But the patch itself looks good:

Regards,
Bjorn

Quoted 24 lines
Cc Bjorn Andersson <[email protected]>
---
 drivers/soc/qcom/smem.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/soc/qcom/smem.c +2 -1
index 2e1aa9f130f4..18ec52f2078a 100644
@@ -740,7 +740,8 @@ static int qcom_smem_probe(struct platform_device *pdev)
 
 	hwlock_id = of_hwspin_lock_get_id(pdev->dev.of_node, 0);
 	if (hwlock_id < 0) {
-		dev_err(&pdev->dev, "failed to retrieve hwlock\n");
+		if (hwlock_id != -EPROBE_DEFER)
+			dev_err(&pdev->dev, "failed to retrieve hwlock\n");
 		return hwlock_id;
 	}
 
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project