mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 10:40:15 +02:00 
			
		
		
		
	cpufreq: Prefer to print cpuid in MIN/MAX QoS register error message
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> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
This commit is contained in:
		
							parent
							
								
									d3dec5bb61
								
							
						
					
					
						commit
						ba6ea77d0e
					
				
					 1 changed files with 4 additions and 4 deletions
				
			
		| 
						 | 
				
			
			@ -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;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue