[PATCH 2/3] soc: qcom: ocmem: register reasons for probe deferrals

Dmitry Baryshkov posted 3 patches 1 week, 4 days ago
There is a newer version of this series
[PATCH 2/3] soc: qcom: ocmem: register reasons for probe deferrals
Posted by Dmitry Baryshkov 1 week, 4 days ago
Instead of printing messages to the dmesg, let the message be recorded
as a reason for the OCMEM client deferral.

Fixes: 88c1e9404f1d ("soc: qcom: add OCMEM driver")
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
---
 drivers/soc/qcom/ocmem.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/soc/qcom/ocmem.c b/drivers/soc/qcom/ocmem.c
index dd46bb14b7be..d57baa9cfa03 100644
--- a/drivers/soc/qcom/ocmem.c
+++ b/drivers/soc/qcom/ocmem.c
@@ -196,10 +196,10 @@ struct ocmem *of_get_ocmem(struct device *dev)
 	}
 
 	pdev = of_find_device_by_node(devnode->parent);
-	if (!pdev) {
-		dev_err(dev, "Cannot find device node %s\n", devnode->name);
-		return ERR_PTR(-EPROBE_DEFER);
-	}
+	if (!pdev)
+		return ERR_PTR(dev_err_probe(dev, -EPROBE_DEFER,
+					     "Cannot find device node %s\n",
+					     devnode->name));
 
 	ocmem = platform_get_drvdata(pdev);
 	put_device(&pdev->dev);

-- 
2.47.3
Re: [PATCH 2/3] soc: qcom: ocmem: register reasons for probe deferrals
Posted by Brian Masney 1 week, 4 days ago
On Mon, Mar 23, 2026 at 03:20:58AM +0200, Dmitry Baryshkov wrote:
> Instead of printing messages to the dmesg, let the message be recorded
> as a reason for the OCMEM client deferral.
> 
> Fixes: 88c1e9404f1d ("soc: qcom: add OCMEM driver")
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> ---
>  drivers/soc/qcom/ocmem.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/soc/qcom/ocmem.c b/drivers/soc/qcom/ocmem.c
> index dd46bb14b7be..d57baa9cfa03 100644
> --- a/drivers/soc/qcom/ocmem.c
> +++ b/drivers/soc/qcom/ocmem.c
> @@ -196,10 +196,10 @@ struct ocmem *of_get_ocmem(struct device *dev)
>  	}
>  
>  	pdev = of_find_device_by_node(devnode->parent);
> -	if (!pdev) {
> -		dev_err(dev, "Cannot find device node %s\n", devnode->name);
> -		return ERR_PTR(-EPROBE_DEFER);
> -	}
> +	if (!pdev)
> +		return ERR_PTR(dev_err_probe(dev, -EPROBE_DEFER,
> +					     "Cannot find device node %s\n",
> +					     devnode->name));

Reviewed-by: Brian Masney <bmasney@redhat.com>

dev_err_probe() was introduced in 2020 (a787e5400a1c) and this driver
was added to the tree prior to that.
Re: [PATCH 2/3] soc: qcom: ocmem: register reasons for probe deferrals
Posted by Dmitry Baryshkov 1 week, 3 days ago
On Mon, Mar 23, 2026 at 07:07:40AM -0400, Brian Masney wrote:
> On Mon, Mar 23, 2026 at 03:20:58AM +0200, Dmitry Baryshkov wrote:
> > Instead of printing messages to the dmesg, let the message be recorded
> > as a reason for the OCMEM client deferral.
> > 
> > Fixes: 88c1e9404f1d ("soc: qcom: add OCMEM driver")
> > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> > ---
> >  drivers/soc/qcom/ocmem.c | 8 ++++----
> >  1 file changed, 4 insertions(+), 4 deletions(-)
> > 
> > diff --git a/drivers/soc/qcom/ocmem.c b/drivers/soc/qcom/ocmem.c
> > index dd46bb14b7be..d57baa9cfa03 100644
> > --- a/drivers/soc/qcom/ocmem.c
> > +++ b/drivers/soc/qcom/ocmem.c
> > @@ -196,10 +196,10 @@ struct ocmem *of_get_ocmem(struct device *dev)
> >  	}
> >  
> >  	pdev = of_find_device_by_node(devnode->parent);
> > -	if (!pdev) {
> > -		dev_err(dev, "Cannot find device node %s\n", devnode->name);
> > -		return ERR_PTR(-EPROBE_DEFER);
> > -	}
> > +	if (!pdev)
> > +		return ERR_PTR(dev_err_probe(dev, -EPROBE_DEFER,
> > +					     "Cannot find device node %s\n",
> > +					     devnode->name));
> 
> Reviewed-by: Brian Masney <bmasney@redhat.com>
> 
> dev_err_probe() was introduced in 2020 (a787e5400a1c) and this driver
> was added to the tree prior to that.

Well... Fixes doesnt' require porting (or 1:1 porting).

-- 
With best wishes
Dmitry
Re: [PATCH 2/3] soc: qcom: ocmem: register reasons for probe deferrals
Posted by Konrad Dybcio 1 week, 4 days ago
On 3/23/26 2:20 AM, Dmitry Baryshkov wrote:
> Instead of printing messages to the dmesg, let the message be recorded
> as a reason for the OCMEM client deferral.
> 
> Fixes: 88c1e9404f1d ("soc: qcom: add OCMEM driver")
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> ---
>  drivers/soc/qcom/ocmem.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/soc/qcom/ocmem.c b/drivers/soc/qcom/ocmem.c
> index dd46bb14b7be..d57baa9cfa03 100644
> --- a/drivers/soc/qcom/ocmem.c
> +++ b/drivers/soc/qcom/ocmem.c
> @@ -196,10 +196,10 @@ struct ocmem *of_get_ocmem(struct device *dev)
>  	}
>  
>  	pdev = of_find_device_by_node(devnode->parent);
> -	if (!pdev) {
> -		dev_err(dev, "Cannot find device node %s\n", devnode->name);
> -		return ERR_PTR(-EPROBE_DEFER);
> -	}
> +	if (!pdev)
> +		return ERR_PTR(dev_err_probe(dev, -EPROBE_DEFER,
> +					     "Cannot find device node %s\n",
> +					     devnode->name));

dev_err_ptr_probe()

Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>

Konrad
Re: [PATCH 2/3] soc: qcom: ocmem: register reasons for probe deferrals
Posted by Dmitry Baryshkov 1 week, 3 days ago
On Mon, Mar 23, 2026 at 11:16:54AM +0100, Konrad Dybcio wrote:
> On 3/23/26 2:20 AM, Dmitry Baryshkov wrote:
> > Instead of printing messages to the dmesg, let the message be recorded
> > as a reason for the OCMEM client deferral.
> > 
> > Fixes: 88c1e9404f1d ("soc: qcom: add OCMEM driver")
> > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> > ---
> >  drivers/soc/qcom/ocmem.c | 8 ++++----
> >  1 file changed, 4 insertions(+), 4 deletions(-)
> > 
> > diff --git a/drivers/soc/qcom/ocmem.c b/drivers/soc/qcom/ocmem.c
> > index dd46bb14b7be..d57baa9cfa03 100644
> > --- a/drivers/soc/qcom/ocmem.c
> > +++ b/drivers/soc/qcom/ocmem.c
> > @@ -196,10 +196,10 @@ struct ocmem *of_get_ocmem(struct device *dev)
> >  	}
> >  
> >  	pdev = of_find_device_by_node(devnode->parent);
> > -	if (!pdev) {
> > -		dev_err(dev, "Cannot find device node %s\n", devnode->name);
> > -		return ERR_PTR(-EPROBE_DEFER);
> > -	}
> > +	if (!pdev)
> > +		return ERR_PTR(dev_err_probe(dev, -EPROBE_DEFER,
> > +					     "Cannot find device node %s\n",
> > +					     devnode->name));
> 
> dev_err_ptr_probe()

Cool!

> 
> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
> 
> Konrad

-- 
With best wishes
Dmitry