Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 198288
b: refs/heads/master
c: d8521fc
h: refs/heads/master
v: v3
  • Loading branch information
OGAWA Hirofumi authored and Linus Torvalds committed May 25, 2010
1 parent 95f08af commit 9239ae4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fa1f68db6ca7ebb6fc4487ac215bffba06c01c28
refs/heads/master: d8521fcc5e0ad3e79bbc4231bb20a6cdc2b50164
15 changes: 7 additions & 8 deletions trunk/include/linux/kernel.h
Original file line number Diff line number Diff line change
Expand Up @@ -424,14 +424,13 @@ static inline char *pack_hex_byte(char *buf, u8 byte)
* no local ratelimit_state used in the !PRINTK case
*/
#ifdef CONFIG_PRINTK
#define printk_ratelimited(fmt, ...) ({ \
static struct ratelimit_state _rs = { \
.interval = DEFAULT_RATELIMIT_INTERVAL, \
.burst = DEFAULT_RATELIMIT_BURST, \
}; \
\
if (__ratelimit(&_rs)) \
printk(fmt, ##__VA_ARGS__); \
#define printk_ratelimited(fmt, ...) ({ \
static DEFINE_RATELIMIT_STATE(_rs, \
DEFAULT_RATELIMIT_INTERVAL, \
DEFAULT_RATELIMIT_BURST); \
\
if (__ratelimit(&_rs)) \
printk(fmt, ##__VA_ARGS__); \
})
#else
/* No effect, but we still get type checking even in the !PRINTK case: */
Expand Down

0 comments on commit 9239ae4

Please sign in to comment.