From patchwork Tue Jan 6 15:39:04 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 42775 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f198.google.com (mail-wi0-f198.google.com [209.85.212.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 72CC821364 for ; Tue, 6 Jan 2015 15:39:52 +0000 (UTC) Received: by mail-wi0-f198.google.com with SMTP id r20sf2543595wiv.9 for ; Tue, 06 Jan 2015 07:39:51 -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=Zk3r6Tdulx87ytVj91FJB4ZpkEtQ7aaasESNeRbOTkU=; b=Ea+w+NbZ21un9XWpMHLYhT4dsAdKiNCx6LhhQEM63PdEC4RkONWPmJIOr44zQNqX2r tC52TQZ6zh8AHDKizi+Jf5xlWitA9vxj2W/w1Km1DkdWnE9FnXKCoEnaFU8Oj6Iw/yDJ ZAVOjWWT4eWWRaP297fodT59lZ0vKE2rZ9RQook15MG55M4mJaYcz2wTyUFgcpbeKVTQ 02/7ja0UfitkMcb08rGQE2+Hza6eeY4PZ7Vj3269zAL6wLqKkMz0QaX8J4uEcMkeOi2m 972V6u2wUBB6ozp+RD7Z40+RxJh+l+5B6t/fGPoXZ99M1vUFUbFZlReMANAYsK0UC4VY sC6g== X-Gm-Message-State: ALoCoQnuJB8NgIyC7Cc9kXU0C3Tla7xQLaNfx+T1E9r6wvHIspusjCRLJrv3NmUthdtfpBxpPbjw X-Received: by 10.113.5.170 with SMTP id cn10mr3756lbd.21.1420558791757; Tue, 06 Jan 2015 07:39:51 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.242.129 with SMTP id wq1ls45721lac.56.gmail; Tue, 06 Jan 2015 07:39:51 -0800 (PST) X-Received: by 10.152.44.167 with SMTP id f7mr90945273lam.92.1420558791609; Tue, 06 Jan 2015 07:39:51 -0800 (PST) Received: from mail-lb0-f175.google.com (mail-lb0-f175.google.com. [209.85.217.175]) by mx.google.com with ESMTPS id q2si66286680lbb.130.2015.01.06.07.39.51 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 06 Jan 2015 07:39:51 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.175 as permitted sender) client-ip=209.85.217.175; Received: by mail-lb0-f175.google.com with SMTP id z11so11924297lbi.34 for ; Tue, 06 Jan 2015 07:39:51 -0800 (PST) X-Received: by 10.112.52.229 with SMTP id w5mr87666164lbo.52.1420558791513; Tue, 06 Jan 2015 07:39:51 -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 c8csp1209534lbb; Tue, 6 Jan 2015 07:39:50 -0800 (PST) X-Received: by 10.70.92.166 with SMTP id cn6mr158431391pdb.164.1420558789224; Tue, 06 Jan 2015 07:39:49 -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.48; Tue, 06 Jan 2015 07:39:49 -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 S1755297AbbAFPjr (ORCPT + 12 others); Tue, 6 Jan 2015 10:39:47 -0500 Received: from mail-pd0-f180.google.com ([209.85.192.180]:52707 "EHLO mail-pd0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754388AbbAFPjr (ORCPT ); Tue, 6 Jan 2015 10:39:47 -0500 Received: by mail-pd0-f180.google.com with SMTP id fl12so15004252pdb.11 for ; Tue, 06 Jan 2015 07:39:46 -0800 (PST) X-Received: by 10.66.66.68 with SMTP id d4mr129314635pat.44.1420558786723; Tue, 06 Jan 2015 07:39:46 -0800 (PST) Received: from localhost ([122.167.212.196]) by mx.google.com with ESMTPSA id fs1sm57402435pdb.16.2015.01.06.07.39.45 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 06 Jan 2015 07:39:46 -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 V3 05/16] cpufreq: stats: don't check for freq table while freeing stats Date: Tue, 6 Jan 2015 21:09:04 +0530 Message-Id: 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.175 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 21bec770569d..e9d68420b876 100644 --- a/drivers/cpufreq/cpufreq_stats.c +++ b/drivers/cpufreq/cpufreq_stats.c @@ -168,8 +168,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); }