linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Don Zickus <dzickus@redhat.com>
To: Yaowei Bai <bywxiaobai@163.com>
Cc: akpm@linux-foundation.org, uobergfe@redhat.com,
	atomlin@redhat.com, cmetcalf@ezchip.com, fweisbec@gmail.com,
	eranian@google.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] kernel/watchdog: is_hardlockup can be boolean
Date: Tue, 22 Sep 2015 11:53:38 -0400	[thread overview]
Message-ID: <20150922155338.GO63416@redhat.com> (raw)
In-Reply-To: <1442928763-4425-1-git-send-email-bywxiaobai@163.com>

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
> 
> 

      parent reply	other threads:[~2015-09-22 15:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-22 13:32 [PATCH] kernel/watchdog: is_hardlockup can be boolean Yaowei Bai
2015-09-22 14:23 ` Aaron Tomlin
2015-09-22 15:53 ` Don Zickus [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150922155338.GO63416@redhat.com \
    --to=dzickus@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=atomlin@redhat.com \
    --cc=bywxiaobai@163.com \
    --cc=cmetcalf@ezchip.com \
    --cc=eranian@google.com \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=uobergfe@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).