summaryrefslogtreecommitdiffstats
path: root/lib/Kconfig
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-02-05 13:45:43 +0100
committerIngo Molnar <mingo@elte.hu>2009-02-05 13:52:29 +0100
commitf036be96dd9ce442ffb9ab33e3c165f5178815c0 (patch)
treec60c39f895bb93ac0000de7772e89a0b6663954b /lib/Kconfig
parentMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/coo... (diff)
downloadlinux-f036be96dd9ce442ffb9ab33e3c165f5178815c0.tar.xz
linux-f036be96dd9ce442ffb9ab33e3c165f5178815c0.zip
printk: introduce printk_once()
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: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'lib/Kconfig')
0 files changed, 0 insertions, 0 deletions