From patchwork Fri Jan 2 05:46:40 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 42661 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ee0-f69.google.com (mail-ee0-f69.google.com [74.125.83.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 0DED326CB5 for ; Fri, 2 Jan 2015 05:47:19 +0000 (UTC) Received: by mail-ee0-f69.google.com with SMTP id d49sf10366389eek.0 for ; Thu, 01 Jan 2015 21:47:18 -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=HQb0kFvhI+G6ZxcfNKL2nZ5UgAXv3SkcdCb2BldBxrk=; b=k3curs3EBx/STgmgwsX5zcoLb8WrlY3dYPrpkdH+qYDf/k4V82grkjjUG9O+qUZJT5 RsUId+gioVJxd150MHRjcrHa0uNyO3AEbmtud/scY95x+OEyVFUKVHkabRW5alK0miQ8 v2z9dYTqK/c644XSZh80xEUdIggTgUuGHi42OBeTAxxbvX84qv7Km1EUHhH7Vr9ExvNG byJoGAYwhDk7UU+K9uSvJF7aHCFXLwZ/6OOrpivQPghMO1W8qtKc+jrLNrrXJcv/f/iV LsY+cVDzOp/mCI2Z92/IVC66vP4YnqR9/Z5JKF5XZwF1O1taAoLsluKenz8Vx2UcglF0 a8hw== X-Gm-Message-State: ALoCoQk2ltGZaU34Yp0/Pd/njr+PrZEE5m34aXKqdeEsKQYZwxW2nC9OlFq6/+jIHh2sHs95Hzyo X-Received: by 10.180.77.167 with SMTP id t7mr7869068wiw.6.1420177638281; Thu, 01 Jan 2015 21:47:18 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.234.203 with SMTP id ug11ls912455lac.67.gmail; Thu, 01 Jan 2015 21:47:17 -0800 (PST) X-Received: by 10.112.148.73 with SMTP id tq9mr74486433lbb.37.1420177637862; Thu, 01 Jan 2015 21:47:17 -0800 (PST) Received: from mail-lb0-f174.google.com (mail-lb0-f174.google.com. [209.85.217.174]) by mx.google.com with ESMTPS id qp3si134745lbb.81.2015.01.01.21.47.17 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 01 Jan 2015 21:47:17 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.174 as permitted sender) client-ip=209.85.217.174; Received: by mail-lb0-f174.google.com with SMTP id 10so14560528lbg.5 for ; Thu, 01 Jan 2015 21:47:17 -0800 (PST) X-Received: by 10.112.64.35 with SMTP id l3mr54705696lbs.82.1420177637784; Thu, 01 Jan 2015 21:47:17 -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 c8csp114439lbb; Thu, 1 Jan 2015 21:47:16 -0800 (PST) X-Received: by 10.66.159.164 with SMTP id xd4mr121134185pab.54.1420177635978; Thu, 01 Jan 2015 21:47:15 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t3si68097479pdc.177.2015.01.01.21.47.15; Thu, 01 Jan 2015 21:47:15 -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 S1750714AbbABFrO (ORCPT + 12 others); Fri, 2 Jan 2015 00:47:14 -0500 Received: from mail-pd0-f177.google.com ([209.85.192.177]:48777 "EHLO mail-pd0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750702AbbABFrN (ORCPT ); Fri, 2 Jan 2015 00:47:13 -0500 Received: by mail-pd0-f177.google.com with SMTP id ft15so23065992pdb.22 for ; Thu, 01 Jan 2015 21:47:13 -0800 (PST) X-Received: by 10.70.33.228 with SMTP id u4mr121104401pdi.146.1420177633284; Thu, 01 Jan 2015 21:47:13 -0800 (PST) Received: from localhost ([122.167.116.151]) by mx.google.com with ESMTPSA id jt8sm31976613pbc.6.2015.01.01.21.47.12 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 01 Jan 2015 21:47:12 -0800 (PST) From: Viresh Kumar To: Rafael Wysocki Cc: linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org, prarit@redhat.com, skannan@codeaurora.org, Viresh Kumar Subject: [PATCH V2 03/14] cpufreq: stats: don't check for freq table while freeing stats Date: Fri, 2 Jan 2015 11:16:40 +0530 Message-Id: <9e3d68b2be73cc83a60c952067eba21918abfa44.1420177186.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.2.0 In-Reply-To: References: In-Reply-To: References: Sender: linux-pm-owner@vger.kernel.org Precedence: list List-ID: 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.217.174 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: , List-Help: , List-Archive: List-Unsubscribe: , While we allocate stats, we do need to check if freq-table is present or not as we need to use it then. But while freeing stats, all we need to know is if stats holds a valid pointer value. There is no use of testing if cpufreq table is present or not. Don't check it. Reviewed-by: Prarit Bhargava Signed-off-by: Viresh Kumar --- drivers/cpufreq/cpufreq_stats.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/cpufreq/cpufreq_stats.c b/drivers/cpufreq/cpufreq_stats.c index 403671b1a5ee..62b6133f06aa 100644 --- a/drivers/cpufreq/cpufreq_stats.c +++ b/drivers/cpufreq/cpufreq_stats.c @@ -174,8 +174,7 @@ static void cpufreq_stats_free_table(unsigned int cpu) if (!policy) return; - if (cpufreq_frequency_get_table(policy->cpu)) - __cpufreq_stats_free_table(policy); + __cpufreq_stats_free_table(policy); cpufreq_cpu_put(policy); }