Message ID | 731eed40967a674b1c2cf7f4428cbe195d78c0ca.1398072824.git.viresh.kumar@linaro.org |
---|---|
State | New |
Headers | show
Return-Path: <patchwork-forward+bncBCRIZROPVQPBBS6X2ONAKGQEJZIXYLY@linaro.org> X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qa0-f72.google.com (mail-qa0-f72.google.com [209.85.216.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 1F9442032B for <linaro@patches.linaro.org>; Mon, 21 Apr 2014 09:58:36 +0000 (UTC) Received: by mail-qa0-f72.google.com with SMTP id hw13sf16484777qab.11 for <linaro@patches.linaro.org>; Mon, 21 Apr 2014 02:58:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:in-reply-to:references :sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=YLWCkhuAfia5Yk8ibjKs2vNea8ok2gCrkNElxCUbOBg=; b=kw5RMhdC9kwlr4PHvEMPDTmej2X4zIaXNYPF4LNa4ywcyQcvafoYZvyEmdMceCG5Qs dwau6SiDA6sZXmLRsU7gkbP6G5Y56AyVolfPrebRZ2/+xUABuh+bcH3UuuzkzsjktCTN UjLFpQUWO4aTTURSMWsK9IoZ/9Wi3u4Qyl/vIYgZ7krdWZ8PH2zYelBbFxqhDKJ2P6FX WVmeKsZ7v53plyOt3v2XrDzpQBrpKaBl015UHTACBdWAgfx/BX3/7vXqA+TCRHhjHGfQ 5C7+F5Dkrp7Oovj+mRbzk1agNYd14OQ+HtUgYYB0ogF0wVMv/qBbZ2s2nZOKfJ1z9teB uHIQ== X-Gm-Message-State: ALoCoQmj24302ZVF76Rh9f90aLvBPJoLa/2jxDcNsmJJ0yXh6jGtRpwlaYbRL8TZkesOSAKETXt6 X-Received: by 10.224.74.74 with SMTP id t10mr16684626qaj.5.1398074315844; Mon, 21 Apr 2014 02:58:35 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.34.233 with SMTP id l96ls2221982qgl.90.gmail; Mon, 21 Apr 2014 02:58:35 -0700 (PDT) X-Received: by 10.221.29.137 with SMTP id ry9mr30429181vcb.6.1398074315759; Mon, 21 Apr 2014 02:58:35 -0700 (PDT) Received: from mail-ve0-f179.google.com (mail-ve0-f179.google.com [209.85.128.179]) by mx.google.com with ESMTPS id vd8si6167059vdc.124.2014.04.21.02.58.35 for <patchwork-forward@linaro.org> (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 21 Apr 2014 02:58:35 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.179 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.179; Received: by mail-ve0-f179.google.com with SMTP id db12so7399157veb.24 for <patchwork-forward@linaro.org>; Mon, 21 Apr 2014 02:58:35 -0700 (PDT) X-Received: by 10.52.183.228 with SMTP id ep4mr972187vdc.30.1398074315698; Mon, 21 Apr 2014 02:58:35 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp280344vcb; Mon, 21 Apr 2014 02:58:35 -0700 (PDT) X-Received: by 10.68.110.129 with SMTP id ia1mr1138260pbb.158.1398074314862; Mon, 21 Apr 2014 02:58:34 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id yl4si20545266pbc.255.2014.04.21.02.58.34; Mon, 21 Apr 2014 02:58:34 -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; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752307AbaDUJ6Y (ORCPT <rfc822;markus.mayer@linaro.org> + 26 others); Mon, 21 Apr 2014 05:58:24 -0400 Received: from mail-wi0-f178.google.com ([209.85.212.178]:64969 "EHLO mail-wi0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752008AbaDUJ4w (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 21 Apr 2014 05:56:52 -0400 Received: by mail-wi0-f178.google.com with SMTP id bs8so1625748wib.5 for <linux-kernel@vger.kernel.org>; Mon, 21 Apr 2014 02:56:51 -0700 (PDT) X-Received: by 10.194.161.168 with SMTP id xt8mr28144630wjb.35.1398074211671; Mon, 21 Apr 2014 02:56:51 -0700 (PDT) Received: from localhost ([213.122.173.131]) by mx.google.com with ESMTPSA id lb4sm56496223wjb.14.2014.04.21.02.56.48 for <multiple recipients> (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 21 Apr 2014 02:56:50 -0700 (PDT) From: Viresh Kumar <viresh.kumar@linaro.org> To: tglx@linutronix.de Cc: linaro-kernel@lists.linaro.org, linaro-networking@linaro.org, linux-kernel@vger.kernel.org, fweisbec@gmail.com, Viresh Kumar <viresh.kumar@linaro.org> Subject: [PATCH V2 15/19] tick-sched: define 'delta' inside 'if' block in update_ts_time_stats() Date: Mon, 21 Apr 2014 15:25:11 +0530 Message-Id: <731eed40967a674b1c2cf7f4428cbe195d78c0ca.1398072824.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 1.7.12.rc2.18.g61b472e In-Reply-To: <cover.1398072824.git.viresh.kumar@linaro.org> References: <cover.1398072824.git.viresh.kumar@linaro.org> In-Reply-To: <cover.1398072824.git.viresh.kumar@linaro.org> References: <cover.1398072824.git.viresh.kumar@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: <patchwork-forward.linaro.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: viresh.kumar@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.179 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: <http://groups.google.com/a/linaro.org/group/patchwork-forward/post>, <mailto:patchwork-forward@linaro.org> List-Help: <http://support.google.com/a/linaro.org/bin/topic.py?topic=25838>, <mailto:patchwork-forward+help@linaro.org> List-Archive: <http://groups.google.com/a/linaro.org/group/patchwork-forward/> List-Unsubscribe: <http://groups.google.com/a/linaro.org/group/patchwork-forward/subscribe>, <mailto:googlegroups-manage+836684582541+unsubscribe@googlegroups.com> |
diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c index c3aed50..8e75c13 100644 --- a/kernel/time/tick-sched.c +++ b/kernel/time/tick-sched.c @@ -412,10 +412,9 @@ static void update_ts_time_stats(int cpu, struct tick_sched *ts, ktime_t now, u64 *last_update_time) { - ktime_t delta; - if (ts->idle_active) { - delta = ktime_sub(now, ts->idle_entrytime); + ktime_t delta = ktime_sub(now, ts->idle_entrytime); + if (nr_iowait_cpu(cpu) > 0) ts->iowait_sleeptime = ktime_add(ts->iowait_sleeptime, delta);
'delta' is used only inside the 'if' block and must be accessible within that. So, move its definition inside the 'if' block. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> --- kernel/time/tick-sched.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)