+ cpufreq-change-print_once-to-printk_once.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     cpufreq: change print_once to printk_once
has been added to the -mm tree.  Its filename is
     cpufreq-change-print_once-to-printk_once.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find
out what to do about this

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
Subject: cpufreq: change print_once to printk_once
From: H Hartley Sweeten <hartleys@xxxxxxxxxxxxxxxxxxx>

Replace the print_once code blocks with the printk_once macro.

Signed-off-by: H Hartley Sweeten <hsweeten@xxxxxxxxxxxxxxxxxxx>
Cc: Minchan Kim <minchan.kim@xxxxxxxxx>
Cc: Dave Jones <davej@xxxxxxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 drivers/cpufreq/cpufreq_conservative.c |   16 ++++------------
 drivers/cpufreq/cpufreq_ondemand.c     |   16 ++++------------
 2 files changed, 8 insertions(+), 24 deletions(-)

diff -puN arch/x86/kernel/cpu/cpufreq/powernow-k8.c~cpufreq-change-print_once-to-printk_once arch/x86/kernel/cpu/cpufreq/powernow-k8.c
diff -puN drivers/cpufreq/cpufreq_conservative.c~cpufreq-change-print_once-to-printk_once drivers/cpufreq/cpufreq_conservative.c
--- a/drivers/cpufreq/cpufreq_conservative.c~cpufreq-change-print_once-to-printk_once
+++ a/drivers/cpufreq/cpufreq_conservative.c
@@ -179,26 +179,18 @@ static struct notifier_block dbs_cpufreq
 /************************** sysfs interface ************************/
 static ssize_t show_sampling_rate_max(struct cpufreq_policy *policy, char *buf)
 {
-	static int print_once;
-
-	if (!print_once) {
-		printk(KERN_INFO "CPUFREQ: conservative sampling_rate_max "
+	printk_once(KERN_INFO "CPUFREQ: conservative sampling_rate_max "
 		       "sysfs file is deprecated - used by: %s\n",
 		       current->comm);
-		print_once = 1;
-	}
+
 	return sprintf(buf, "%u\n", MAX_SAMPLING_RATE);
 }
 
 static ssize_t show_sampling_rate_min(struct cpufreq_policy *policy, char *buf)
 {
-	static int print_once;
-
-	if (!print_once) {
-		printk(KERN_INFO "CPUFREQ: conservative sampling_rate_max "
+	printk_once(KERN_INFO "CPUFREQ: conservative sampling_rate_max "
 		       "sysfs file is deprecated - used by: %s\n", current->comm);
-		print_once = 1;
-	}
+
 	return sprintf(buf, "%u\n", MIN_SAMPLING_RATE);
 }
 
diff -puN drivers/cpufreq/cpufreq_ondemand.c~cpufreq-change-print_once-to-printk_once drivers/cpufreq/cpufreq_ondemand.c
--- a/drivers/cpufreq/cpufreq_ondemand.c~cpufreq-change-print_once-to-printk_once
+++ a/drivers/cpufreq/cpufreq_ondemand.c
@@ -216,27 +216,19 @@ static void ondemand_powersave_bias_init
 /************************** sysfs interface ************************/
 static ssize_t show_sampling_rate_max(struct cpufreq_policy *policy, char *buf)
 {
-	static int print_once;
-
-	if (!print_once) {
-		printk(KERN_INFO "CPUFREQ: ondemand sampling_rate_max "
+	printk_once(KERN_INFO "CPUFREQ: ondemand sampling_rate_max "
 		       "sysfs file is deprecated - used by: %s\n",
 		       current->comm);
-		print_once = 1;
-	}
+
 	return sprintf(buf, "%u\n", MAX_SAMPLING_RATE);
 }
 
 static ssize_t show_sampling_rate_min(struct cpufreq_policy *policy, char *buf)
 {
-	static int print_once;
-
-	if (!print_once) {
-		printk(KERN_INFO "CPUFREQ: ondemand sampling_rate_min "
+	printk_once(KERN_INFO "CPUFREQ: ondemand sampling_rate_min "
 		       "sysfs file is deprecated - used by: %s\n",
 		       current->comm);
-		print_once = 1;
-	}
+
 	return sprintf(buf, "%u\n", MIN_SAMPLING_RATE);
 }
 
_

Patches currently in -mm which might be from hartleys@xxxxxxxxxxxxxxxxxxx are

linux-next.patch
mm-page-writebackc-dirty-limit-type-should-be-unsigned-long.patch
cpufreq-change-print_once-to-printk_once.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux