lkml.org 
[lkml]   [2015]   [Sep]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] kernel/watchdog: is_hardlockup can be boolean
On Tue, Sep 22, 2015 at 09:32:43PM +0800, Yaowei Bai wrote:
> This patch makes 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.

Looks fine.

Acked-by: Don Zickus <dzickus@redhat.com>

>
> Signed-off-by: Yaowei Bai <bywxiaobai@163.com>
> ---
> kernel/watchdog.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/kernel/watchdog.c b/kernel/watchdog.c
> index 64ed1c3..568ba64 100644
> --- a/kernel/watchdog.c
> +++ b/kernel/watchdog.c
> @@ -263,15 +263,15 @@ void touch_softlockup_watchdog_sync(void)
>
> #ifdef CONFIG_HARDLOCKUP_DETECTOR
> /* watchdog detector functions */
> -static int is_hardlockup(void)
> +static bool is_hardlockup(void)
> {
> unsigned long hrint = __this_cpu_read(hrtimer_interrupts);
>
> if (__this_cpu_read(hrtimer_interrupts_saved) == hrint)
> - return 1;
> + return true;
>
> __this_cpu_write(hrtimer_interrupts_saved, hrint);
> - return 0;
> + return false;
> }
> #endif
>
> --
> 1.9.1
>
>


\
 
 \ /
  Last update: 2015-09-22 18:21    [W:0.042 / U:1.316 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site