From: Linus Torvalds Date: Sun, 5 Apr 2009 17:23:25 +0000 (-0700) Subject: Merge branch 'printk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git... X-Git-Url: http://www.pilppa.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=e4c393fd551654179c46b65e4a70ea20d831c783;p=linux-2.6-omap-h63xx.git Merge branch 'printk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'printk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: printk: correct the behavior of printk_timed_ratelimit() vsprintf: unify the format decoding layer for its 3 users, cleanup fix regression from "vsprintf: unify the format decoding layer for its 3 users" vsprintf: fix bug in negative value printing vsprintf: unify the format decoding layer for its 3 users vsprintf: add binary printf printk: introduce printk_once() Fix trivial conflicts (printk_once vs log_buf_kexec_setup() added near each other) in include/linux/kernel.h. --- e4c393fd551654179c46b65e4a70ea20d831c783 diff --cc include/linux/kernel.h index 556d781e69f,6e4406e12c6..cff58e288a2 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h @@@ -242,7 -242,19 +242,20 @@@ extern struct ratelimit_state printk_ra extern int printk_ratelimit(void); extern bool printk_timed_ratelimit(unsigned long *caller_jiffies, unsigned int interval_msec); + + /* + * Print a one-time message (analogous to WARN_ONCE() et al): + */ + #define printk_once(x...) ({ \ + static int __print_once = 1; \ + \ + if (__print_once) { \ + __print_once = 0; \ + printk(x); \ + } \ + }) + +void log_buf_kexec_setup(void); #else static inline int vprintk(const char *s, va_list args) __attribute__ ((format (printf, 1, 0))); @@@ -254,9 -266,10 +267,13 @@@ static inline int printk_ratelimit(void static inline bool printk_timed_ratelimit(unsigned long *caller_jiffies, \ unsigned int interval_msec) \ { return false; } + + /* No effect, but we still get type checking even in the !PRINTK case: */ + #define printk_once(x...) printk(x) + +static inline void log_buf_kexec_setup(void) +{ +} #endif extern int printk_needs_cpu(int cpu); diff --cc include/linux/string.h index 8852739f36d,27ac31784ad..3c877d68637 --- a/include/linux/string.h +++ b/include/linux/string.h @@@ -10,9 -10,9 +10,10 @@@ #include /* for inline */ #include /* for size_t */ #include /* for NULL */ + #include extern char *strndup_user(const char __user *, long); +extern void *memdup_user(const void __user *, size_t); /* * Include machine specific inline routines