diff options
author | Sergey Senozhatsky <sergey.senozhatsky@gmail.com> | 2016-01-15 19:59:23 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-01-16 14:17:31 -0500 |
commit | 06b031de22d28ae76b2e5bfaf22c56a265a1e106 (patch) | |
tree | e4f4bda8145145f17e469564bba0dbf114293c81 | |
parent | 5b17aecfcdd3dc82c237677f5efc9a44deeaa39e (diff) |
printk: change recursion_bug type to bool
`recursion_bug' is used as recursion_bug toggle, so make it `bool'.
Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | kernel/printk/printk.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c index 08934a395c1a..e79439134978 100644 --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c | |||
@@ -1661,7 +1661,7 @@ asmlinkage int vprintk_emit(int facility, int level, | |||
1661 | const char *dict, size_t dictlen, | 1661 | const char *dict, size_t dictlen, |
1662 | const char *fmt, va_list args) | 1662 | const char *fmt, va_list args) |
1663 | { | 1663 | { |
1664 | static int recursion_bug; | 1664 | static bool recursion_bug; |
1665 | static char textbuf[LOG_LINE_MAX]; | 1665 | static char textbuf[LOG_LINE_MAX]; |
1666 | char *text = textbuf; | 1666 | char *text = textbuf; |
1667 | size_t text_len = 0; | 1667 | size_t text_len = 0; |
@@ -1697,7 +1697,7 @@ asmlinkage int vprintk_emit(int facility, int level, | |||
1697 | * it can be printed at the next appropriate moment: | 1697 | * it can be printed at the next appropriate moment: |
1698 | */ | 1698 | */ |
1699 | if (!oops_in_progress && !lockdep_recursing(current)) { | 1699 | if (!oops_in_progress && !lockdep_recursing(current)) { |
1700 | recursion_bug = 1; | 1700 | recursion_bug = true; |
1701 | local_irq_restore(flags); | 1701 | local_irq_restore(flags); |
1702 | return 0; | 1702 | return 0; |
1703 | } | 1703 | } |
@@ -1712,7 +1712,7 @@ asmlinkage int vprintk_emit(int facility, int level, | |||
1712 | static const char recursion_msg[] = | 1712 | static const char recursion_msg[] = |
1713 | "BUG: recent printk recursion!"; | 1713 | "BUG: recent printk recursion!"; |
1714 | 1714 | ||
1715 | recursion_bug = 0; | 1715 | recursion_bug = false; |
1716 | /* emit KERN_CRIT message */ | 1716 | /* emit KERN_CRIT message */ |
1717 | printed_len += log_store(0, 2, LOG_PREFIX|LOG_NEWLINE, 0, | 1717 | printed_len += log_store(0, 2, LOG_PREFIX|LOG_NEWLINE, 0, |
1718 | NULL, 0, recursion_msg, | 1718 | NULL, 0, recursion_msg, |