1. 07 3月, 2009 1 次提交
  2. 05 2月, 2009 1 次提交
    • I
      printk: introduce printk_once() · f036be96
      Ingo Molnar 提交于
      This pattern shows up frequently in the kernel:
      
        static int once = 1;
        ...
      
      		if (once) {
      			once = 0;
      			printk(KERN_ERR "message\n");
      		}
        ...
      
      So add a printk_once() helper macro that reduces this to a single line
      of:
      
      		printk_once(KERN_ERR "message\n");
      
      It works analogously to WARN_ONCE() & friends. (We use a macro not
      an inline because vararg expansion in inlines looks awkward and the
      macro is simple enough.)
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      f036be96
  3. 04 2月, 2009 38 次提交