diff options
author | Yaowei Bai <bywxiaobai@163.com> | 2015-11-05 21:44:24 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-11-05 22:34:48 -0500 |
commit | 451637e454f0b41689cd07cdc3fa53388c22890d (patch) | |
tree | e4a957254759d4aa677b4916e2ca969e09a93cf4 /kernel/watchdog.c | |
parent | b64787401fd85b66403dd05159a749e333059c0a (diff) |
kernel/watchdog.c: is_hardlockup can be boolean
Make is_hardlockup return bool to improve readability due to this
particular function only using either one or zero as its return value.
No functional change.
Signed-off-by: Yaowei Bai <bywxiaobai@163.com>
Reviewed-by: Aaron Tomlin <atomlin@redhat.com>
Acked-by: Don Zickus <dzickus@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/watchdog.c')
-rw-r--r-- | kernel/watchdog.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/watchdog.c b/kernel/watchdog.c index 64ed1c37bd1f..568ba64b22d6 100644 --- a/kernel/watchdog.c +++ b/kernel/watchdog.c | |||
@@ -263,15 +263,15 @@ void touch_softlockup_watchdog_sync(void) | |||
263 | 263 | ||
264 | #ifdef CONFIG_HARDLOCKUP_DETECTOR | 264 | #ifdef CONFIG_HARDLOCKUP_DETECTOR |
265 | /* watchdog detector functions */ | 265 | /* watchdog detector functions */ |
266 | static int is_hardlockup(void) | 266 | static bool is_hardlockup(void) |
267 | { | 267 | { |
268 | unsigned long hrint = __this_cpu_read(hrtimer_interrupts); | 268 | unsigned long hrint = __this_cpu_read(hrtimer_interrupts); |
269 | 269 | ||
270 | if (__this_cpu_read(hrtimer_interrupts_saved) == hrint) | 270 | if (__this_cpu_read(hrtimer_interrupts_saved) == hrint) |
271 | return 1; | 271 | return true; |
272 | 272 | ||
273 | __this_cpu_write(hrtimer_interrupts_saved, hrint); | 273 | __this_cpu_write(hrtimer_interrupts_saved, hrint); |
274 | return 0; | 274 | return false; |
275 | } | 275 | } |
276 | #endif | 276 | #endif |
277 | 277 | ||