Subject: Re: [PATCH] powerpc: Only print clockevent settings once

From: Anton Blanchard <[email-masked]>
Date: Mon, 8 Feb 2010 16:26:29 +1100

Hi Wolfram,

> What about printk_once from kernel.h?

Thanks for the suggestion!

Anton
--

The clockevent multiplier and shift is useful information, but we
only need to print it once.

Signed-off-by: Anton Blanchard <[email-masked]>
---

Index: powerpc.git/arch/powerpc/kernel/time.c
===================================================================
--- powerpc.git.orig/arch/powerpc/kernel/time.c	2010-02-08 11:45:12.933073040 +1100
+++ powerpc.git/arch/powerpc/kernel/time.c	2010-02-08 16:21:08.505571532 +1100
@@ -935,8 +935,8 @@ static void register_decrementer_clockev
 	*dec = decrementer_clockevent;
 	dec->cpumask = cpumask_of(cpu);
 
-	printk(KERN_DEBUG "clockevent: %s mult[%x] shift[%d] cpu[%d]\n",
-	       dec->name, dec->mult, dec->shift, cpu);
+	printk_once(KERN_DEBUG "clockevent: %s mult[%x] shift[%d] cpu[%d]\n",
+		    dec->name, dec->mult, dec->shift, cpu);
 
 	clockevents_register_device(dec);
 }