From patchwork Tue Apr 10 08:51:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: yuankuiz@codeaurora.org X-Patchwork-Id: 10332601 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E0A7E6028A for ; Tue, 10 Apr 2018 08:51:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D1D7028D29 for ; Tue, 10 Apr 2018 08:51:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C647D28D6B; Tue, 10 Apr 2018 08:51:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4C46A28D29 for ; Tue, 10 Apr 2018 08:51:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752635AbeDJIvk (ORCPT ); Tue, 10 Apr 2018 04:51:40 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:37568 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752623AbeDJIvj (ORCPT ); Tue, 10 Apr 2018 04:51:39 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 87AAE60F5F; Tue, 10 Apr 2018 08:51:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1523350298; bh=f8bW40qVjyAplki9u6P045b++eeMeFYFk3oChFDsPog=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=OL5nS1t3bML+6SxFMnWwI/NL/7nYgjk4mvps9s137mEzYyygwiLFw4wSaKoMJqpJK FC7c2TtkfLea4gqCjRwdZGY/9Q8b8eesAlFd3+M8WzW4OG5c7lho9TNLPDM5D5Bfb9 jVDcEpSp2ESKBeaSXtL4W/2z97ewJ9zfzwd3r3K4= Received: from mail.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.codeaurora.org (Postfix) with ESMTP id 99E5360250; Tue, 10 Apr 2018 08:51:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1523350297; bh=f8bW40qVjyAplki9u6P045b++eeMeFYFk3oChFDsPog=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=aInDko9RmkM6twPLb/qfk7L1CNXsbHlgr+9lGx9NfqwGx3eOP4la3pKshGmUswOEd gZAKygT4FUWqI8IKZPVQBd/7IHBfWRR+AsFSFRKxljQ6F8IHlWn/lXfQW9rgvJ4sOQ 50pecSUCwWT2Mo891ZXZHENghTO7x5rjeaPh1Iqc= MIME-Version: 1.0 Date: Tue, 10 Apr 2018 16:51:37 +0800 From: yuankuiz@codeaurora.org To: linux-pm@vger.kernel.org Cc: rjw@rjwysocki.net, fweisbec@gmail.com, peterz@infradead.org, tglx@linutronix.de, mingo@kernel.org, len.brown@intel.com, linux-kernel@vger.kernel.org Subject: [PATCH] time: tick-sched: use bool for tick_stopped In-Reply-To: <9ee70560651fefffcc61949d8a37315d@codeaurora.org> References: <891d4f632fbff5052e11f2d0b6fac35d@codeaurora.org> <9ee70560651fefffcc61949d8a37315d@codeaurora.org> Message-ID: X-Sender: yuankuiz@codeaurora.org User-Agent: Roundcube Webmail/1.2.5 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: John Zhao Variable tick_stopped returned by tick_nohz_tick_stopped can only be true / false values. Since the return type of the tick_nohz_tick_stopped is also bool, variable tick_stopped nice to have data type as 'bool' in place of the 'unsigned int'. Moreover, the executed instructions cost could be minimal without potiential data type conversion. Signed-off-by: John Zhao --- kernel/time/tick-sched.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/time/tick-sched.h b/kernel/time/tick-sched.h index 6de959a..4d34309 100644 --- a/kernel/time/tick-sched.h +++ b/kernel/time/tick-sched.h @@ -48,8 +48,8 @@ struct tick_sched { unsigned long check_clocks; enum tick_nohz_mode nohz_mode; + bool tick_stopped : 1; unsigned int inidle : 1; - unsigned int tick_stopped : 1; unsigned int idle_active : 1; unsigned int do_timer_last : 1; unsigned int got_idle_tick : 1;