Received: by 10.213.65.68 with SMTP id h4csp3565275imn; Tue, 10 Apr 2018 00:38:05 -0700 (PDT) X-Google-Smtp-Source: AIpwx48RGIiLSNogcIftuGJPzEJY+viaG4XbGOHKvetOBhZreM1fPdmmJvBN9o8FNEzJfLdNpCxL X-Received: by 10.101.70.72 with SMTP id k8mr26375357pgr.402.1523345885144; Tue, 10 Apr 2018 00:38:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523345885; cv=none; d=google.com; s=arc-20160816; b=JLN5LnUG2GN3AHoJm3H6Rt4lfEvxuLM9dE0VfYM1q50Esg2NjpCM4UDVv2uyerlhmt 3pp4hN5avOYEA9UYyIdgm5ZG4QBL/BXCxCCRvumSwNCj7hVBeYcrpSfGBO4yXU1BW6eo XqnAGHdhxUjmsaVoGRhxnHTbxRwCTr5AgvRPRAUg0JkuC/ot3gCWoYWi8RTzn23i40Op y+L7o8gHypiTKc8/BAOVTrcW1U2A9nl2LQJCCD9DQEUW8nVkyCCekl5JGV5ncHLfEhao MfRJ1FnWuWjE1rGEHqxw9EiW5wjXRDSbnWv5sC7TFXSI8EBFKG2q3gw9cd3L3zR2vSCO SKTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:message-id:subject:cc:to:from :date:content-transfer-encoding:mime-version:dkim-signature :dkim-signature:arc-authentication-results; bh=ohdfS0W1l1OuYH6dcqmNkdTuLGKhWfipuJ1NyQ8ouqc=; b=XU12Xj9I/g48BqrmtTCtEFoeJr346fQfuWkMNBfjJcQd340pEm8zVVI/4i5gsMTdVK iIB0owTG0CiHHlZD/rEI3sWTxXap5VI5LSG72x/tDLiwxgt/Gu2NBkoTnZJ/sLloVyaq aqmnvLjvIOePmEhyldoR6r+bTvX98BQZWT/uy7/wPI7RAtcMdjd9m+d/hJvCnZf2GsbU pzd3gI5SQhrc3PfNxqlMjrmOEYgVASMrSihKDKsMWSH5CBDsCSuc1PXbqNQdPdb+y1dz UCQMEO33hn0pWnHxAYOmiMII1J+hdbx9Xm/elsRF0ig3wtBfi4zLEQpEFAH/L/BmW5Zl sjUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=CuWjXBlM; dkim=pass header.i=@codeaurora.org header.s=default header.b=Dp9QppYC; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 62si1641823pfw.173.2018.04.10.00.37.27; Tue, 10 Apr 2018 00:38:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=CuWjXBlM; dkim=pass header.i=@codeaurora.org header.s=default header.b=Dp9QppYC; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752191AbeDJHdr (ORCPT + 99 others); Tue, 10 Apr 2018 03:33:47 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:47844 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751490AbeDJHdq (ORCPT ); Tue, 10 Apr 2018 03:33:46 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id F0CAA602BA; Tue, 10 Apr 2018 07:33:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1523345626; bh=IcaFHz+KCw+P7H2SR9bE23KXNzF0SkZwbOHMk1owXwQ=; h=Date:From:To:Cc:Subject:From; b=CuWjXBlMFvMPzalgAZbsNd8HSU1VIArWPIWvOwiwIXuHdJ9asjuNMTxaX6gUmiKHM AIty5UKraTSn1l1CC/6WMY9gyvCUYNabGGI14quTKLZfKeQPAJQiEeTF5rUwMJZyNd yfqWeR3qkIPrBWNUuvlNnPdeX7v4j3eRu9Fx+0jw= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from mail.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.codeaurora.org (Postfix) with ESMTP id F03AE602BA; Tue, 10 Apr 2018 07:33:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1523345625; bh=IcaFHz+KCw+P7H2SR9bE23KXNzF0SkZwbOHMk1owXwQ=; h=Date:From:To:Cc:Subject:From; b=Dp9QppYCDZvfUiRCmmKKYawCoQAx9vx0iB3V4YDLZC9I57Qp7xO5X2fttIdm6PgQG 3wmFqzG0rgIwZrbidkBUTzbAAlsvaBc/LiOhczgjzfbP+WP54PiAxb5jlyjmTF7SS/ p1YXDMCE85iqxqGkuqAQODwf+bjqsvO/WGO6WgTM= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 10 Apr 2018 15:33:44 +0800 From: yuankuiz@codeaurora.org To: linux-pm@vger.kernel.org Cc: rjw@rjwysocki.net, fweisbec@gmail.com, peterz@infradead.org, tglx@linutronix.de, aulmck@linux.vnet.ibm.com, mingo@kernel.org, len.brown@intel.com, linux-kernel@vger.kernel.org Subject: Subject: [PATCH] [PATCH] time: tick-sched: use bool for tick_stopped Message-ID: <891d4f632fbff5052e11f2d0b6fac35d@codeaurora.org> X-Sender: yuankuiz@codeaurora.org User-Agent: Roundcube Webmail/1.2.5 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: John Zhao Variable tick_stopped returned by tick_nohz_tick_stopped can have only true / forse 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 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;