aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2008-02-08 07:21:25 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-08 12:22:39 -0500
commit7ef3d2fd17c377ef64a2aa19677d17576606c3b4 (patch)
tree036c2fe4a87bda412908bc82602ce29f4d431dbe /include/linux
parent36e789144267105e0b3f2b9bca7db3184fce50dc (diff)
printk_ratelimit() functions should use CONFIG_PRINTK
Makes an embedded image a bit smaller. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/kernel.h18
1 files changed, 13 insertions, 5 deletions
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index 7d7519628dfa..8f28d35867f8 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -180,6 +180,13 @@ asmlinkage int printk(const char * fmt, ...)
180extern int log_buf_get_len(void); 180extern int log_buf_get_len(void);
181extern int log_buf_read(int idx); 181extern int log_buf_read(int idx);
182extern int log_buf_copy(char *dest, int idx, int len); 182extern int log_buf_copy(char *dest, int idx, int len);
183
184extern int printk_ratelimit_jiffies;
185extern int printk_ratelimit_burst;
186extern int printk_ratelimit(void);
187extern int __printk_ratelimit(int ratelimit_jiffies, int ratelimit_burst);
188extern bool printk_timed_ratelimit(unsigned long *caller_jiffies,
189 unsigned int interval_msec);
183#else 190#else
184static inline int vprintk(const char *s, va_list args) 191static inline int vprintk(const char *s, va_list args)
185 __attribute__ ((format (printf, 1, 0))); 192 __attribute__ ((format (printf, 1, 0)));
@@ -190,6 +197,12 @@ static inline int __cold printk(const char *s, ...) { return 0; }
190static inline int log_buf_get_len(void) { return 0; } 197static inline int log_buf_get_len(void) { return 0; }
191static inline int log_buf_read(int idx) { return 0; } 198static inline int log_buf_read(int idx) { return 0; }
192static inline int log_buf_copy(char *dest, int idx, int len) { return 0; } 199static inline int log_buf_copy(char *dest, int idx, int len) { return 0; }
200static inline int printk_ratelimit(void) { return 0; }
201static inline int __printk_ratelimit(int ratelimit_jiffies, \
202 int ratelimit_burst) { return 0; }
203static inline bool printk_timed_ratelimit(unsigned long *caller_jiffies, \
204 unsigned int interval_msec) \
205 { return false; }
193#endif 206#endif
194 207
195extern void __attribute__((format(printf, 1, 2))) 208extern void __attribute__((format(printf, 1, 2)))
@@ -197,11 +210,6 @@ extern void __attribute__((format(printf, 1, 2)))
197 210
198unsigned long int_sqrt(unsigned long); 211unsigned long int_sqrt(unsigned long);
199 212
200extern int printk_ratelimit(void);
201extern int __printk_ratelimit(int ratelimit_jiffies, int ratelimit_burst);
202extern bool printk_timed_ratelimit(unsigned long *caller_jiffies,
203 unsigned int interval_msec);
204
205static inline void console_silent(void) 213static inline void console_silent(void)
206{ 214{
207 console_loglevel = 0; 215 console_loglevel = 0;