mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] cpufreq: qcom-cpufreq-hw: Use dev_err_probe() when failing to get icc paths
@ 2023-06-23 15:57 Andrew Halaney
  2023-06-23 17:08 ` Bjorn Andersson
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Halaney @ 2023-06-23 15:57 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-pm, linux-arm-msm, viresh.kumar, rafael, konrad.dybcio,
	andersson, agross, Andrew Halaney

This way, if there's an issue (in this case a -EPROBE_DEFER), you can
get useful output:

    [root@dhcp19-243-150 ~]# cat /sys/kernel/debug/devices_deferred
    18591000.cpufreq        qcom-cpufreq-hw: Failed to find icc paths

Signed-off-by: Andrew Halaney <ahalaney@redhat.com>
---
 drivers/cpufreq/qcom-cpufreq-hw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/cpufreq/qcom-cpufreq-hw.c b/drivers/cpufreq/qcom-cpufreq-hw.c
index a78d7a27b4b5..f2830371d25f 100644
--- a/drivers/cpufreq/qcom-cpufreq-hw.c
+++ b/drivers/cpufreq/qcom-cpufreq-hw.c
@@ -661,7 +661,7 @@ static int qcom_cpufreq_hw_driver_probe(struct platform_device *pdev)
 
 	ret = dev_pm_opp_of_find_icc_paths(cpu_dev, NULL);
 	if (ret)
-		return ret;
+		return dev_err_probe(dev, ret, "Failed to find icc paths\n");
 
 	for (num_domains = 0; num_domains < MAX_FREQ_DOMAINS; num_domains++)
 		if (!platform_get_resource(pdev, IORESOURCE_MEM, num_domains))
-- 
2.40.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] cpufreq: qcom-cpufreq-hw: Use dev_err_probe() when failing to get icc paths
  2023-06-23 15:57 [PATCH] cpufreq: qcom-cpufreq-hw: Use dev_err_probe() when failing to get icc paths Andrew Halaney
@ 2023-06-23 17:08 ` Bjorn Andersson
  2023-06-26  6:40   ` Viresh Kumar
  0 siblings, 1 reply; 3+ messages in thread
From: Bjorn Andersson @ 2023-06-23 17:08 UTC (permalink / raw)
  To: Andrew Halaney
  Cc: linux-kernel, linux-pm, linux-arm-msm, viresh.kumar, rafael,
	konrad.dybcio, andersson, agross

On Fri, Jun 23, 2023 at 10:57:07AM -0500, Andrew Halaney wrote:
> This way, if there's an issue (in this case a -EPROBE_DEFER), you can
> get useful output:
> 
>     [root@dhcp19-243-150 ~]# cat /sys/kernel/debug/devices_deferred
>     18591000.cpufreq        qcom-cpufreq-hw: Failed to find icc paths
> 
> Signed-off-by: Andrew Halaney <ahalaney@redhat.com>

Reviewed-by: Bjorn Andersson <quic_bjorande@quicinc.com>

Regards,
Bjorn

> ---
>  drivers/cpufreq/qcom-cpufreq-hw.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/cpufreq/qcom-cpufreq-hw.c b/drivers/cpufreq/qcom-cpufreq-hw.c
> index a78d7a27b4b5..f2830371d25f 100644
> --- a/drivers/cpufreq/qcom-cpufreq-hw.c
> +++ b/drivers/cpufreq/qcom-cpufreq-hw.c
> @@ -661,7 +661,7 @@ static int qcom_cpufreq_hw_driver_probe(struct platform_device *pdev)
>  
>  	ret = dev_pm_opp_of_find_icc_paths(cpu_dev, NULL);
>  	if (ret)
> -		return ret;
> +		return dev_err_probe(dev, ret, "Failed to find icc paths\n");
>  
>  	for (num_domains = 0; num_domains < MAX_FREQ_DOMAINS; num_domains++)
>  		if (!platform_get_resource(pdev, IORESOURCE_MEM, num_domains))
> -- 
> 2.40.1
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] cpufreq: qcom-cpufreq-hw: Use dev_err_probe() when failing to get icc paths
  2023-06-23 17:08 ` Bjorn Andersson
@ 2023-06-26  6:40   ` Viresh Kumar
  0 siblings, 0 replies; 3+ messages in thread
From: Viresh Kumar @ 2023-06-26  6:40 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: Andrew Halaney, linux-kernel, linux-pm, linux-arm-msm, rafael,
	konrad.dybcio, andersson, agross

On 23-06-23, 10:08, Bjorn Andersson wrote:
> On Fri, Jun 23, 2023 at 10:57:07AM -0500, Andrew Halaney wrote:
> > This way, if there's an issue (in this case a -EPROBE_DEFER), you can
> > get useful output:
> > 
> >     [root@dhcp19-243-150 ~]# cat /sys/kernel/debug/devices_deferred
> >     18591000.cpufreq        qcom-cpufreq-hw: Failed to find icc paths
> > 
> > Signed-off-by: Andrew Halaney <ahalaney@redhat.com>
> 
> Reviewed-by: Bjorn Andersson <quic_bjorande@quicinc.com>

Applied. Thanks.

-- 
viresh

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-06-26  6:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-23 15:57 [PATCH] cpufreq: qcom-cpufreq-hw: Use dev_err_probe() when failing to get icc paths Andrew Halaney
2023-06-23 17:08 ` Bjorn Andersson
2023-06-26  6:40   ` Viresh Kumar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®