From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933507AbbIVPxm (ORCPT ); Tue, 22 Sep 2015 11:53:42 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46877 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933371AbbIVPxk (ORCPT ); Tue, 22 Sep 2015 11:53:40 -0400 Date: Tue, 22 Sep 2015 11:53:38 -0400 From: Don Zickus To: Yaowei Bai 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 Message-ID: <20150922155338.GO63416@redhat.com> References: <1442928763-4425-1-git-send-email-bywxiaobai@163.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1442928763-4425-1-git-send-email-bywxiaobai@163.com> User-Agent: Mutt/1.5.20 (2009-12-10) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > > Signed-off-by: Yaowei Bai > --- > 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 > >