linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] PM / OPP: Remove confusing error message in of_cpumask_init_opp_table()
@ 2015-10-14 15:52 Thomas Petazzoni
  2015-10-14 21:28 ` Rafael J. Wysocki
  2015-10-15  7:35 ` Viresh Kumar
  0 siblings, 2 replies; 12+ messages in thread
From: Thomas Petazzoni @ 2015-10-14 15:52 UTC (permalink / raw)
  To: Viresh Kumar, Rafael J . Wysocki, Len Brown, Pavel Machek
  Cc: Greg Kroah-Hartman, linux-pm, linux-kernel, Tawfik Bayouk,
	Nadav Haklai, Lior Amsalem, Gregory Clement, Thomas Petazzoni

The of_cpumask_init_opp_table() function will print an error message
(with pr_err) if it cannot find the OPP table for a certain CPU in the
Device Tree.

There are users of the cpufreq-dt driver (which is the one calling
of_cpumask_init_opp_table) that do not have the OPP points defined in
the Device Tree. Instead, such users dynamically create the OPP table
at boot time depending on the system configuration. Such a case is
planned in the cpufreq-dt driver, which on purpose ignores the return
value of of_cpumask_init_opp_table() with the following comment: "OPPs
might be populated at runtime, don't check for error here".

For such platforms, the of_cpumask_init_opp_table() prints a spurious
and confusing error message for each CPU:

[    1.749548] of_cpumask_init_opp_table: couldn't find opp table for cpu:0, -19
[    1.756784] of_cpumask_init_opp_table: couldn't find opp table for cpu:1, -19
[    1.764031] of_cpumask_init_opp_table: couldn't find opp table for cpu:2, -19
[    1.771268] of_cpumask_init_opp_table: couldn't find opp table for cpu:3, -19

This is confusing because everything is working fine, cpufreq works
and it knows the OPP table that was registered at boot time (on
Marvell Armada XP):

$ cat /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state
666500 1884
1333000 23333

To avoid this confusion, this patch simply deletes the error message.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 drivers/base/power/opp.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/base/power/opp.c b/drivers/base/power/opp.c
index 7ae7cd9..11206d2 100644
--- a/drivers/base/power/opp.c
+++ b/drivers/base/power/opp.c
@@ -1489,9 +1489,6 @@ int of_cpumask_init_opp_table(cpumask_var_t cpumask)
 
 		ret = of_init_opp_table(cpu_dev);
 		if (ret) {
-			pr_err("%s: couldn't find opp table for cpu:%d, %d\n",
-			       __func__, cpu, ret);
-
 			/* Free all other OPPs */
 			of_cpumask_free_opp_table(cpumask);
 			break;
-- 
2.6.1


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

end of thread, other threads:[~2015-10-16  5:39 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-14 15:52 [PATCH] PM / OPP: Remove confusing error message in of_cpumask_init_opp_table() Thomas Petazzoni
2015-10-14 21:28 ` Rafael J. Wysocki
2015-10-14 21:10   ` Thomas Petazzoni
2015-10-14 21:44     ` Rafael J. Wysocki
2015-10-14 21:29       ` Thomas Petazzoni
2015-10-14 21:59         ` Rafael J. Wysocki
2015-10-14 21:31           ` Thomas Petazzoni
2015-10-15  7:35 ` Viresh Kumar
2015-10-15  7:42   ` Thomas Petazzoni
2015-10-15 14:37     ` Viresh Kumar
2015-10-15 21:26       ` Rafael J. Wysocki
2015-10-16  5:39         ` 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).