Message ID | 1ba77985e7069b5199f95c57878d56307046a44f.1418902789.git.viresh.kumar@linaro.org |
---|---|
State | New |
Headers | show
Return-Path: <patchwork-forward+bncBCRIZROPVQPBBDUEZOSAKGQESSJA7AQ@linaro.org> X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f70.google.com (mail-la0-f70.google.com [209.85.215.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 909A126C8B for <linaro@patches.linaro.org>; Thu, 18 Dec 2014 12:01:19 +0000 (UTC) Received: by mail-la0-f70.google.com with SMTP id hs14sf652882lab.5 for <linaro@patches.linaro.org>; Thu, 18 Dec 2014 04:01: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=KR59v5k8nNKmWBU1fA6BRPyDhJZVKMqiQ5WQ7pt9fLs=; b=CbcDZ/eEZZ08+gX7qA8gzN5w9E+3KJAybRveVdwenTHXC5f9Nkozc29bsv6au3KwmJ bTUX42JjTTLnoPLiYZ/Z5PN9Sp/LOVagtCm8LcFlvKCdeyAobhsTw5KUWjM6o4SUocLi xygMfcZv6j8Bz0YVp8AF8Z8xy+7L6Ra+yWfOH4Hw+xa5CKcI30SW+1vOxJgbZ5qXcqCI SIyY/OnS3AoUNQ6g/geze2vudXndW2NdEtIFBZG66dUDNLZ2V8jE/JTVuv8hFZ5jFxjJ BvguEbDHr+7iA5UVYfHXCigu2P3s46SWeA5T3Fjua7v3wCdfuBpo/oX8I4YnUMquEgvf 5Xkg== X-Gm-Message-State: ALoCoQnyR4Dbu3PHECNmytkMbudexDlerOsdsTWoGmB9IjxaQeXytx77Spd7v5Pvr5K0gnbn2EYN X-Received: by 10.180.228.38 with SMTP id sf6mr2086824wic.5.1418904078554; Thu, 18 Dec 2014 04:01:18 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.204.65 with SMTP id kw1ls1177876lac.70.gmail; Thu, 18 Dec 2014 04:01:18 -0800 (PST) X-Received: by 10.152.22.67 with SMTP id b3mr1895388laf.82.1418904078075; Thu, 18 Dec 2014 04:01:18 -0800 (PST) Received: from mail-lb0-f171.google.com (mail-lb0-f171.google.com. [209.85.217.171]) by mx.google.com with ESMTPS id ai4si6714637lbc.10.2014.12.18.04.01.18 for <patchwork-forward@linaro.org> (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 18 Dec 2014 04:01:18 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.171 as permitted sender) client-ip=209.85.217.171; Received: by mail-lb0-f171.google.com with SMTP id w7so833233lbi.30 for <patchwork-forward@linaro.org>; Thu, 18 Dec 2014 04:01:17 -0800 (PST) X-Received: by 10.152.2.74 with SMTP id 10mr1851707las.38.1418904077925; Thu, 18 Dec 2014 04:01: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.142.69 with SMTP id ru5csp1680373lbb; Thu, 18 Dec 2014 04:01:17 -0800 (PST) X-Received: by 10.70.90.39 with SMTP id bt7mr2852432pdb.52.1418904076143; Thu, 18 Dec 2014 04:01:16 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ov3si9608661pbc.228.2014.12.18.04.01.15; Thu, 18 Dec 2014 04:01:16 -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 S1751341AbaLRMBO (ORCPT <rfc822;amit.pundir@linaro.org> + 12 others); Thu, 18 Dec 2014 07:01:14 -0500 Received: from mail-pa0-f45.google.com ([209.85.220.45]:56875 "EHLO mail-pa0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751564AbaLRMBO (ORCPT <rfc822;linux-pm@vger.kernel.org>); Thu, 18 Dec 2014 07:01:14 -0500 Received: by mail-pa0-f45.google.com with SMTP id lf10so1281238pab.32 for <linux-pm@vger.kernel.org>; Thu, 18 Dec 2014 04:01:13 -0800 (PST) X-Received: by 10.70.1.8 with SMTP id 8mr2949803pdi.26.1418904073331; Thu, 18 Dec 2014 04:01:13 -0800 (PST) Received: from localhost ([122.166.148.73]) by mx.google.com with ESMTPSA id or10sm6573769pbc.83.2014.12.18.04.01.12 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 18 Dec 2014 04:01:12 -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, Viresh Kumar <viresh.kumar@linaro.org> Subject: [PATCH 03/13] cpufreq: stats: don't check for freq table while freeing stats Date: Thu, 18 Dec 2014 17:30:20 +0530 Message-Id: <1ba77985e7069b5199f95c57878d56307046a44f.1418902789.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.2.0 In-Reply-To: <cover.1418902789.git.viresh.kumar@linaro.org> References: <cover.1418902789.git.viresh.kumar@linaro.org> In-Reply-To: <cover.1418902789.git.viresh.kumar@linaro.org> References: <cover.1418902789.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.217.171 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 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); }
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. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> --- drivers/cpufreq/cpufreq_stats.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)