* [PATCH 1/2] cpufreq: Prefer to print cpuid in MIN/MAX QoS register error message
@ 2023-08-15 1:40 Liao Chang
2023-08-16 3:35 ` Viresh Kumar
2023-08-17 8:43 ` Viresh Kumar
0 siblings, 2 replies; 3+ messages in thread
From: Liao Chang @ 2023-08-15 1:40 UTC (permalink / raw)
To: rafael, viresh.kumar; +Cc: linux-pm, linux-kernel
When a cpufreq_policy is allocated, the cpus, related_cpus and real_cpus
of policy are still unset. Therefore, it is preferable to print the
passed 'cpu' parameter instead of a empty 'cpus' cpumask in error
message when registering MIN/MAX QoS notifier fails.
Signed-off-by: Liao Chang <liaochang1@huawei.com>
---
drivers/cpufreq/cpufreq.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index 50bbc969ffe5..a757f90aa9d6 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -1234,16 +1234,16 @@ static struct cpufreq_policy *cpufreq_policy_alloc(unsigned int cpu)
ret = freq_qos_add_notifier(&policy->constraints, FREQ_QOS_MIN,
&policy->nb_min);
if (ret) {
- dev_err(dev, "Failed to register MIN QoS notifier: %d (%*pbl)\n",
- ret, cpumask_pr_args(policy->cpus));
+ dev_err(dev, "Failed to register MIN QoS notifier: %d (CPU%u)\n",
+ ret, cpu);
goto err_kobj_remove;
}
ret = freq_qos_add_notifier(&policy->constraints, FREQ_QOS_MAX,
&policy->nb_max);
if (ret) {
- dev_err(dev, "Failed to register MAX QoS notifier: %d (%*pbl)\n",
- ret, cpumask_pr_args(policy->cpus));
+ dev_err(dev, "Failed to register MAX QoS notifier: %d (CPU%u)\n",
+ ret, cpu);
goto err_min_qos_notifier;
}
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/2] cpufreq: Prefer to print cpuid in MIN/MAX QoS register error message
2023-08-15 1:40 [PATCH 1/2] cpufreq: Prefer to print cpuid in MIN/MAX QoS register error message Liao Chang
@ 2023-08-16 3:35 ` Viresh Kumar
2023-08-17 8:43 ` Viresh Kumar
1 sibling, 0 replies; 3+ messages in thread
From: Viresh Kumar @ 2023-08-16 3:35 UTC (permalink / raw)
To: Liao Chang; +Cc: rafael, linux-pm, linux-kernel
On 15-08-23, 09:40, Liao Chang wrote:
> When a cpufreq_policy is allocated, the cpus, related_cpus and real_cpus
> of policy are still unset. Therefore, it is preferable to print the
> passed 'cpu' parameter instead of a empty 'cpus' cpumask in error
> message when registering MIN/MAX QoS notifier fails.
>
> Signed-off-by: Liao Chang <liaochang1@huawei.com>
> ---
> drivers/cpufreq/cpufreq.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
> index 50bbc969ffe5..a757f90aa9d6 100644
> --- a/drivers/cpufreq/cpufreq.c
> +++ b/drivers/cpufreq/cpufreq.c
> @@ -1234,16 +1234,16 @@ static struct cpufreq_policy *cpufreq_policy_alloc(unsigned int cpu)
> ret = freq_qos_add_notifier(&policy->constraints, FREQ_QOS_MIN,
> &policy->nb_min);
> if (ret) {
> - dev_err(dev, "Failed to register MIN QoS notifier: %d (%*pbl)\n",
> - ret, cpumask_pr_args(policy->cpus));
> + dev_err(dev, "Failed to register MIN QoS notifier: %d (CPU%u)\n",
> + ret, cpu);
> goto err_kobj_remove;
> }
>
> ret = freq_qos_add_notifier(&policy->constraints, FREQ_QOS_MAX,
> &policy->nb_max);
> if (ret) {
> - dev_err(dev, "Failed to register MAX QoS notifier: %d (%*pbl)\n",
> - ret, cpumask_pr_args(policy->cpus));
> + dev_err(dev, "Failed to register MAX QoS notifier: %d (CPU%u)\n",
> + ret, cpu);
> goto err_min_qos_notifier;
> }
>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
--
viresh
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 1/2] cpufreq: Prefer to print cpuid in MIN/MAX QoS register error message
2023-08-15 1:40 [PATCH 1/2] cpufreq: Prefer to print cpuid in MIN/MAX QoS register error message Liao Chang
2023-08-16 3:35 ` Viresh Kumar
@ 2023-08-17 8:43 ` Viresh Kumar
1 sibling, 0 replies; 3+ messages in thread
From: Viresh Kumar @ 2023-08-17 8:43 UTC (permalink / raw)
To: Liao Chang; +Cc: rafael, linux-pm, linux-kernel
On 15-08-23, 09:40, Liao Chang wrote:
> When a cpufreq_policy is allocated, the cpus, related_cpus and real_cpus
> of policy are still unset. Therefore, it is preferable to print the
> passed 'cpu' parameter instead of a empty 'cpus' cpumask in error
> message when registering MIN/MAX QoS notifier fails.
>
> Signed-off-by: Liao Chang <liaochang1@huawei.com>
> ---
> drivers/cpufreq/cpufreq.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
> index 50bbc969ffe5..a757f90aa9d6 100644
> --- a/drivers/cpufreq/cpufreq.c
> +++ b/drivers/cpufreq/cpufreq.c
> @@ -1234,16 +1234,16 @@ static struct cpufreq_policy *cpufreq_policy_alloc(unsigned int cpu)
> ret = freq_qos_add_notifier(&policy->constraints, FREQ_QOS_MIN,
> &policy->nb_min);
> if (ret) {
> - dev_err(dev, "Failed to register MIN QoS notifier: %d (%*pbl)\n",
> - ret, cpumask_pr_args(policy->cpus));
> + dev_err(dev, "Failed to register MIN QoS notifier: %d (CPU%u)\n",
> + ret, cpu);
> goto err_kobj_remove;
> }
>
> ret = freq_qos_add_notifier(&policy->constraints, FREQ_QOS_MAX,
> &policy->nb_max);
> if (ret) {
> - dev_err(dev, "Failed to register MAX QoS notifier: %d (%*pbl)\n",
> - ret, cpumask_pr_args(policy->cpus));
> + dev_err(dev, "Failed to register MAX QoS notifier: %d (CPU%u)\n",
> + ret, cpu);
> goto err_min_qos_notifier;
> }
Applied both the patches. Thanks.
--
viresh
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-08-17 8:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-15 1:40 [PATCH 1/2] cpufreq: Prefer to print cpuid in MIN/MAX QoS register error message Liao Chang
2023-08-16 3:35 ` Viresh Kumar
2023-08-17 8:43 ` Viresh Kumar
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).