From patchwork Thu Dec 4 04:12:03 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 41905 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f199.google.com (mail-wi0-f199.google.com [209.85.212.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 4A94F25E88 for ; Thu, 4 Dec 2014 04:14:12 +0000 (UTC) Received: by mail-wi0-f199.google.com with SMTP id bs8sf10529199wib.6 for ; Wed, 03 Dec 2014 20:14:11 -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=FBfiGunsU6LT9RHcusVg4qdVrxrhCVCcd2sn2VnOWK8=; b=O7accDI6KGAqVciIAOC1QP9YEiqgmDDGzNoRk4WGxeHu5EexQ9/Fk/4DjWBW4WgUp6 2m8Rf6GtrlW9jqZGQAcHetFGzGw4N6BdSikZKL7X/dtkgQ7Y9l1gi167uKjBFu7pZnrN jg2WZHxhywVTDB4s6mgko3PgcujX+CCJ0ZznXMV3fByq1fN4/XhFI034pq6O5NVmrwFf bKFJ7kfbz89qBscmm9rEgEyF1eZlHJoH9iw1wx5qRpqUE99dXTt++OdVNGISZxHwoNEV 4FVZg8nv3UL6eT0gKc3RtNWZtKs9NfXOZKfvUn7TRyb3baJOOlx3hLKzZFHAJWlH23oV 16qQ== X-Gm-Message-State: ALoCoQnsVM3HK6iUej63nK5bgOBgFhX/2Wp1L4KJPeqgPNSq4M/R9wHH4O7ADD0ALxqzDiNlClYR X-Received: by 10.112.138.234 with SMTP id qt10mr1806544lbb.4.1417666451554; Wed, 03 Dec 2014 20:14:11 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.205.98 with SMTP id lf2ls214132lac.16.gmail; Wed, 03 Dec 2014 20:14:11 -0800 (PST) X-Received: by 10.152.5.6 with SMTP id o6mr7479570lao.8.1417666451353; Wed, 03 Dec 2014 20:14:11 -0800 (PST) Received: from mail-lb0-f179.google.com (mail-lb0-f179.google.com. [209.85.217.179]) by mx.google.com with ESMTPS id wj6si24624142lbb.90.2014.12.03.20.14.11 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 03 Dec 2014 20:14:11 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.179 as permitted sender) client-ip=209.85.217.179; Received: by mail-lb0-f179.google.com with SMTP id z11so13300518lbi.10 for ; Wed, 03 Dec 2014 20:14:11 -0800 (PST) X-Received: by 10.152.21.66 with SMTP id t2mr7120991lae.27.1417666451280; Wed, 03 Dec 2014 20:14:11 -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.184.201 with SMTP id ew9csp781105lbc; Wed, 3 Dec 2014 20:14:10 -0800 (PST) X-Received: by 10.70.43.209 with SMTP id y17mr1630184pdl.2.1417666449566; Wed, 03 Dec 2014 20:14:09 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id df1si18139882pdb.237.2014.12.03.20.14.08 for ; Wed, 03 Dec 2014 20:14:09 -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 S1752740AbaLDEOI (ORCPT + 12 others); Wed, 3 Dec 2014 23:14:08 -0500 Received: from mail-pa0-f51.google.com ([209.85.220.51]:55969 "EHLO mail-pa0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752582AbaLDEOH (ORCPT ); Wed, 3 Dec 2014 23:14:07 -0500 Received: by mail-pa0-f51.google.com with SMTP id ey11so17283298pad.10 for ; Wed, 03 Dec 2014 20:14:07 -0800 (PST) X-Received: by 10.68.230.97 with SMTP id sx1mr22216409pbc.154.1417666446988; Wed, 03 Dec 2014 20:14:06 -0800 (PST) Received: from localhost ([122.166.92.172]) by mx.google.com with ESMTPSA id fn5sm24532610pdb.55.2014.12.03.20.14.04 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 03 Dec 2014 20:14:05 -0800 (PST) From: Viresh Kumar To: linux-pm@vger.kernel.org, edubezval@gmail.com Cc: linaro-kernel@lists.linaro.org, rui.zhang@intel.com, amit.daniel@samsung.com, javi.merino@arm.com, Viresh Kumar Subject: [PATCH V2 21/26] thermal: cpu_cooling: get_property() doesn't need to support GET_MAXL anymore Date: Thu, 4 Dec 2014 09:42:03 +0530 Message-Id: <76f4dd2d1e4b05119de5a99fcf1c1e685de1141d.1417664938.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.0.3.693.g996b0fd 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.179 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: , We don't use get_property() to find max levels anymore as it is done at boot now. So, don't support GET_MAXL in get_property(). Signed-off-by: Viresh Kumar --- drivers/thermal/cpu_cooling.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c index d34cc5b..d2e6f84 100644 --- a/drivers/thermal/cpu_cooling.c +++ b/drivers/thermal/cpu_cooling.c @@ -116,7 +116,6 @@ static void release_idr(struct idr *idr, int id) enum cpufreq_cooling_property { GET_LEVEL, GET_FREQ, - GET_MAXL, }; /** @@ -124,12 +123,11 @@ enum cpufreq_cooling_property { * @cpu: cpu for which the property is required * @input: query parameter * @output: query return - * @property: type of query (frequency, level, max level) + * @property: type of query (frequency, level) * * This is the common function to - * 1. get maximum cpu cooling states - * 2. translate frequency to cooling state - * 3. translate cooling state to frequency + * 1. translate frequency to cooling state + * 2. translate cooling state to frequency * * Note that the code may be not in good shape * but it is written in this way in order to: @@ -176,12 +174,6 @@ static int get_property(unsigned int cpu, unsigned long input, /* max_level is an index, not a counter */ max_level--; - /* get max level */ - if (property == GET_MAXL) { - *output = (unsigned int)max_level; - return 0; - } - if (property == GET_FREQ) level = descend ? input : (max_level - input);