Skip to contentSkip to conversation

cpufreq {d,}printk adjustments

PATCH In review Jan Beulich 2 participants 3 messages Apr 26, 2006 – Apr 28, 2006 CPU frequency scaling framework

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cpufreq {d,}printk adjustments

Convert some dprintk-s to printk-s as their use of KERN_* indicates they were meant to be used that way. Alternatively, the KERN_* prefixes could be removed and the dprintk-s then retained.

diff -Npru /home/jbeulich/tmp/linux-2.6.17-rc2/drivers/cpufreq/cpufreq.c 2.6.17-rc2-cpufreq-dprintk/drivers/cpufreq/cpufreq.c

drivers/cpufreq/cpufreq.c renamed from home/jbeulich/tmp/linux-2.6.17-rc2/drivers/cpufreq/cpufreq.c +6 -6
@@ -257,9 +257,9 @@ void cpufreq_notify_transition(struct cp
 		if (!(cpufreq_driver->flags & CPUFREQ_CONST_LOOPS)) {
 			if ((policy) && (policy->cpu == freqs->cpu) &&
 			    (policy->cur) && (policy->cur != freqs->old)) {
-				dprintk(KERN_WARNING "Warning: CPU frequency is"
-					" %u, cpufreq assumed %u kHz.\n",
-					freqs->old, policy->cur);
+				printk(KERN_WARNING "Warning: CPU frequency is"
+				       " %u, cpufreq assumed %u kHz.\n",
+				       freqs->old, policy->cur);
 				freqs->old = policy->cur;
 			}
 		}
@@ -874,7 +874,7 @@ static void cpufreq_out_of_sync(unsigned
 {
 	struct cpufreq_freqs freqs;
 
-	dprintk(KERN_WARNING "Warning: CPU frequency out of sync: cpufreq and timing "
+	printk(KERN_WARNING "Warning: CPU frequency out of sync: cpufreq and timing "
 	       "core thinks of %u, is %u kHz.\n", old_freq, new_freq);
 
 	freqs.cpu = cpu;
@@ -1006,7 +1006,7 @@ static int cpufreq_suspend(struct sys_de
 		struct cpufreq_freqs freqs;
 
 		if (!(cpufreq_driver->flags & CPUFREQ_PM_NO_WARN))
-			dprintk(KERN_DEBUG "Warning: CPU frequency is %u, "
+			printk(KERN_WARNING "Warning: CPU frequency is %u, "
 			       "cpufreq assumed %u kHz.\n",
 			       cur_freq, cpu_policy->cur);
 
@@ -1087,7 +1087,7 @@ static int cpufreq_resume(struct sys_dev
 			struct cpufreq_freqs freqs;
 
 			if (!(cpufreq_driver->flags & CPUFREQ_PM_NO_WARN))
-				dprintk(KERN_WARNING "Warning: CPU frequency"
+				printk(KERN_WARNING "Warning: CPU frequency"
 				       "is %u, cpufreq assumed %u kHz.\n",
 				       cur_freq, cpu_policy->cur);
 
#1 lore raw

Hi,

Quoted 3 lines · Jan Beulich

Convert some dprintk-s to printk-s as their use of KERN_* indicates they were meant to be used that way. Alternatively, the KERN_* prefixes could be removed and the dprintk-s then retained.

For these ones, removing KERN_* and leaving them as dprintk() seems to be the better choice. The other two patches look fine to me.

Thanks!

Dominik

#2 lore raw
Quoted 6 lines
Quoted 3 lines

Convert some dprintk-s to printk-s as their use of KERN_* indicates they were meant to be used that way. Alternatively, the KERN_* prefixes could be removed and the dprintk-s then retained.

For these ones, removing KERN_* and leaving them as dprintk() seems to be the better choice. The other two patches look fine to me.

Remove KERN_* suffixes from some cpufreq driver's dprintk-s.

diff -Npru /home/jbeulich/tmp/linux-2.6.17-rc3/drivers/cpufreq/cpufreq.c 2.6.17-rc3-cpufreq-dprintk/drivers/cpufreq/cpufreq.c

drivers/cpufreq/cpufreq.c renamed from home/jbeulich/tmp/linux-2.6.17-rc3/drivers/cpufreq/cpufreq.c +4 -4
@@ -257,7 +257,7 @@ void cpufreq_notify_transition(struct cp
 		if (!(cpufreq_driver->flags & CPUFREQ_CONST_LOOPS)) {
 			if ((policy) && (policy->cpu == freqs->cpu) &&
 			    (policy->cur) && (policy->cur != freqs->old)) {
-				dprintk(KERN_WARNING "Warning: CPU frequency is"
+				dprintk("Warning: CPU frequency is"
 					" %u, cpufreq assumed %u kHz.\n",
 					freqs->old, policy->cur);
 				freqs->old = policy->cur;
@@ -874,7 +874,7 @@ static void cpufreq_out_of_sync(unsigned
 {
 	struct cpufreq_freqs freqs;
 
-	dprintk(KERN_WARNING "Warning: CPU frequency out of sync: cpufreq and timing "
+	dprintk("Warning: CPU frequency out of sync: cpufreq and timing "
 	       "core thinks of %u, is %u kHz.\n", old_freq, new_freq);
 
 	freqs.cpu = cpu;
@@ -1006,7 +1006,7 @@ static int cpufreq_suspend(struct sys_de
 		struct cpufreq_freqs freqs;
 
 		if (!(cpufreq_driver->flags & CPUFREQ_PM_NO_WARN))
-			dprintk(KERN_DEBUG "Warning: CPU frequency is %u, "
+			dprintk("Warning: CPU frequency is %u, "
 			       "cpufreq assumed %u kHz.\n",
 			       cur_freq, cpu_policy->cur);
 
@@ -1087,7 +1087,7 @@ static int cpufreq_resume(struct sys_dev
 			struct cpufreq_freqs freqs;
 
 			if (!(cpufreq_driver->flags & CPUFREQ_PM_NO_WARN))
-				dprintk(KERN_WARNING "Warning: CPU frequency"
+				dprintk("Warning: CPU frequency"
 				       "is %u, cpufreq assumed %u kHz.\n",
 				       cur_freq, cpu_policy->cur);