]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
sh: use printk_ratelimited instead of printk_ratelimit
authorPaul Mundt <lethal@linux-sh.org>
Thu, 30 Jun 2011 06:10:06 +0000 (15:10 +0900)
committerPaul Mundt <lethal@linux-sh.org>
Thu, 30 Jun 2011 06:10:06 +0000 (15:10 +0900)
Follows the powerpc change, for much the same rationale.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
arch/sh/kernel/irq.c
arch/sh/mm/alignment.c

index 91971103b62b56e7bd4352a441bf7282b8dac061..a3ee91971129099826493db6c23b463417284f56 100644 (file)
@@ -13,6 +13,7 @@
 #include <linux/seq_file.h>
 #include <linux/ftrace.h>
 #include <linux/delay.h>
+#include <linux/ratelimit.h>
 #include <asm/processor.h>
 #include <asm/machvec.h>
 #include <asm/uaccess.h>
@@ -268,9 +269,8 @@ void migrate_irqs(void)
                        unsigned int newcpu = cpumask_any_and(data->affinity,
                                                              cpu_online_mask);
                        if (newcpu >= nr_cpu_ids) {
-                               if (printk_ratelimit())
-                                       printk(KERN_INFO "IRQ%u no longer affine to CPU%u\n",
-                                              irq, cpu);
+                               pr_info_ratelimited("IRQ%u no longer affine to CPU%u\n",
+                                                   irq, cpu);
 
                                cpumask_setall(data->affinity);
                                newcpu = cpumask_any_and(data->affinity,
index b2595b8548ee353b4c5099be26ba6fa940565cb7..620fa7ff9eec88164bdbac180562974f31485912 100644 (file)
@@ -13,6 +13,7 @@
 #include <linux/seq_file.h>
 #include <linux/proc_fs.h>
 #include <linux/uaccess.h>
+#include <linux/ratelimit.h>
 #include <asm/alignment.h>
 #include <asm/processor.h>
 
@@ -95,13 +96,13 @@ int set_unalign_ctl(struct task_struct *tsk, unsigned int val)
 void unaligned_fixups_notify(struct task_struct *tsk, insn_size_t insn,
                             struct pt_regs *regs)
 {
-       if (user_mode(regs) && (se_usermode & UM_WARN) && printk_ratelimit())
-               pr_notice("Fixing up unaligned userspace access "
+       if (user_mode(regs) && (se_usermode & UM_WARN))
+               pr_notice_ratelimited("Fixing up unaligned userspace access "
                          "in \"%s\" pid=%d pc=0x%p ins=0x%04hx\n",
                          tsk->comm, task_pid_nr(tsk),
                          (void *)instruction_pointer(regs), insn);
-       else if (se_kernmode_warn && printk_ratelimit())
-               pr_notice("Fixing up unaligned kernel access "
+       else if (se_kernmode_warn)
+               pr_notice_ratelimited("Fixing up unaligned kernel access "
                          "in \"%s\" pid=%d pc=0x%p ins=0x%04hx\n",
                          tsk->comm, task_pid_nr(tsk),
                          (void *)instruction_pointer(regs), insn);