Message ID | f6b08820927c368580677af08411ed3963292fc1.1420558386.git.viresh.kumar@linaro.org |
---|---|
State | New |
Headers | show
Return-Path: <patchwork-forward+bncBCRIZROPVQPBBQ4DWCSQKGQEEOVVQDQ@linaro.org> X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-we0-f197.google.com (mail-we0-f197.google.com [74.125.82.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 00A4E2055F for <linaro@patches.linaro.org>; Tue, 6 Jan 2015 15:39:48 +0000 (UTC) Received: by mail-we0-f197.google.com with SMTP id w61sf4911450wes.4 for <linaro@patches.linaro.org>; Tue, 06 Jan 2015 07:39:47 -0800 (PST) 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=9HoZQ0pSp/brDciiq5KDsB308kA+IAeQQNI8gwfQ0L0=; b=UvGJqjT3wot6ZavW2+PQWoifgI+HQKW1pT88Skp/VLuKkMUf5NxHAkl9/oFiEwOpfh PuttweZDJnOv0UvU6nHKlyNRb6xNf/dCO3dNmC4LHd76FzElOSNDsacH4yydzdc3aDKA W05YCEn1R7mV+1ruejrroZ+tEip6nYGmrMnCd6NDLqz6/8z593H3RrVQ77oMnphqA/zZ O2Yg9zYMGOHM7t1G5Us1+mPeZFAjNr8BkHWG0KLVtwexbDczecd+hbn7mKbMAiEk00lG rNXieB6YfVbiYc5vy2W0R6rDaBzAyKdDd5cEbf17+o6XiAzTG1+eKHCCIbTVco5yNP5g PxWw== X-Gm-Message-State: ALoCoQnlH/91vhB2jUY3EDlI4j9wt2yNZ5pijhfSaH9w6aVTE/DmbIVmekOOZN48zZUgrvFfyqzA X-Received: by 10.112.118.18 with SMTP id ki18mr281431lbb.15.1420558787308; Tue, 06 Jan 2015 07:39:47 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.21.9 with SMTP id r9ls59393lae.31.gmail; Tue, 06 Jan 2015 07:39:47 -0800 (PST) X-Received: by 10.152.7.180 with SMTP id k20mr102721106laa.4.1420558787005; Tue, 06 Jan 2015 07:39:47 -0800 (PST) Received: from mail-la0-f41.google.com (mail-la0-f41.google.com. [209.85.215.41]) by mx.google.com with ESMTPS id f8si60401463laa.135.2015.01.06.07.39.46 for <patchwork-forward@linaro.org> (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 06 Jan 2015 07:39:46 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.41 as permitted sender) client-ip=209.85.215.41; Received: by mail-la0-f41.google.com with SMTP id hv19so19904067lab.14 for <patchwork-forward@linaro.org>; Tue, 06 Jan 2015 07:39:46 -0800 (PST) X-Received: by 10.152.5.226 with SMTP id v2mr100681043lav.34.1420558786920; Tue, 06 Jan 2015 07:39:46 -0800 (PST) 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.112.9.200 with SMTP id c8csp1209510lbb; Tue, 6 Jan 2015 07:39:46 -0800 (PST) X-Received: by 10.70.92.166 with SMTP id cn6mr158430829pdb.164.1420558785086; Tue, 06 Jan 2015 07:39:45 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id hz4si17325227pbb.8.2015.01.06.07.39.44; Tue, 06 Jan 2015 07:39:45 -0800 (PST) Received-SPF: none (google.com: linux-pm-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754695AbbAFPjn (ORCPT <rfc822;amit.pundir@linaro.org> + 12 others); Tue, 6 Jan 2015 10:39:43 -0500 Received: from mail-pa0-f44.google.com ([209.85.220.44]:41324 "EHLO mail-pa0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754388AbbAFPjn (ORCPT <rfc822;linux-pm@vger.kernel.org>); Tue, 6 Jan 2015 10:39:43 -0500 Received: by mail-pa0-f44.google.com with SMTP id et14so31363370pad.3 for <linux-pm@vger.kernel.org>; Tue, 06 Jan 2015 07:39:42 -0800 (PST) X-Received: by 10.66.102.103 with SMTP id fn7mr138772514pab.113.1420558782760; Tue, 06 Jan 2015 07:39:42 -0800 (PST) Received: from localhost ([122.167.212.196]) by mx.google.com with ESMTPSA id wt4sm57682297pab.4.2015.01.06.07.39.41 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 06 Jan 2015 07:39:42 -0800 (PST) From: Viresh Kumar <viresh.kumar@linaro.org> To: Rafael Wysocki <rjw@rjwysocki.net> Cc: linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org, prarit@redhat.com, skannan@codeaurora.org, Viresh Kumar <viresh.kumar@linaro.org> Subject: [PATCH V3 04/16] cpufreq: stats: initialize 'cur_time' on its definition Date: Tue, 6 Jan 2015 21:09:03 +0530 Message-Id: <f6b08820927c368580677af08411ed3963292fc1.1420558386.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.2.0 In-Reply-To: <cover.1420558386.git.viresh.kumar@linaro.org> References: <cover.1420558386.git.viresh.kumar@linaro.org> In-Reply-To: <cover.1420558386.git.viresh.kumar@linaro.org> References: <cover.1420558386.git.viresh.kumar@linaro.org> Sender: linux-pm-owner@vger.kernel.org Precedence: list List-ID: <patchwork-forward.linaro.org> X-Mailing-List: linux-pm@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=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.41 as permitted sender) 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: <mailto:googlegroups-manage+836684582541+unsubscribe@googlegroups.com>, <http://groups.google.com/a/linaro.org/group/patchwork-forward/subscribe> |
diff --git a/drivers/cpufreq/cpufreq_stats.c b/drivers/cpufreq/cpufreq_stats.c index 14f8d858a63d..21bec770569d 100644 --- a/drivers/cpufreq/cpufreq_stats.c +++ b/drivers/cpufreq/cpufreq_stats.c @@ -36,9 +36,8 @@ static DEFINE_PER_CPU(struct cpufreq_stats *, cpufreq_stats_table); static int cpufreq_stats_update(unsigned int cpu) { struct cpufreq_stats *stat; - unsigned long long cur_time; + unsigned long long cur_time = get_jiffies_64(); - cur_time = get_jiffies_64(); spin_lock(&cpufreq_stats_lock); stat = per_cpu(cpufreq_stats_table, cpu); if (stat->time_in_state)
'cur_time' is defined in the first line and is then assigned a value in the next line. Initialize it while defining it. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> --- drivers/cpufreq/cpufreq_stats.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)