From patchwork Wed Sep 11 10:13:08 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 19958 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qc0-f198.google.com (mail-qc0-f198.google.com [209.85.216.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 2BD9A248D9 for ; Wed, 11 Sep 2013 10:17:13 +0000 (UTC) Received: by mail-qc0-f198.google.com with SMTP id l13sf5763636qcy.9 for ; Wed, 11 Sep 2013 03:17:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=mime-version:x-gm-message-state:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:in-reply-to:references :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=KjV31HKXwCNPry3POERXFbfxf4a8HNiu7629hP+npuY=; b=lhrCvCzkOZ7DytBaBhYPnxwafYEpXm7TYze7sdyGS0UNAKDUAa+swEuUVoQmzpLJ7z IkIwmkf/lCy0y84vJajM87sy0CBbhT5wEkXi2zmG4VVhKLGo8bei35hCHBAF7HRUR6C1 cBy3EqcwxQFEcpj/UncDI3wHtVO60MdFL7yzjDWErKcunH9L5Y1xdzGJacR7eG/3JhxN VaDuq1+QDiUP6swgnlZIAJrzuKUSYHbjgTv475MdHzPFrPZQlvA/tFFbTWhL8feB843T O2LLUmpNDmDFi0emuiADn0T+XIwAbK0VW3yCAvXkDs8UKBGrSqH79RMamjBaTak0fM5c OcIQ== X-Received: by 10.236.24.195 with SMTP id x43mr338148yhx.3.1378894633029; Wed, 11 Sep 2013 03:17:13 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.104.111 with SMTP id gd15ls170184qeb.68.gmail; Wed, 11 Sep 2013 03:17:12 -0700 (PDT) X-Received: by 10.52.103.101 with SMTP id fv5mr51242vdb.31.1378894632791; Wed, 11 Sep 2013 03:17:12 -0700 (PDT) Received: from mail-vb0-f53.google.com (mail-vb0-f53.google.com [209.85.212.53]) by mx.google.com with ESMTPS id un5si5789447vcb.22.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 11 Sep 2013 03:17:12 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.53 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.53; Received: by mail-vb0-f53.google.com with SMTP id i3so5777413vbh.26 for ; Wed, 11 Sep 2013 03:17:12 -0700 (PDT) X-Gm-Message-State: ALoCoQm38gWeXntZzJokQrioAEV79UK+Kop5loeUlYGB8S+JIVhmfHSTzR3hHnKUIPFW+xWtvLZ3 X-Received: by 10.220.164.70 with SMTP id d6mr503937vcy.19.1378894632670; Wed, 11 Sep 2013 03:17:12 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp47844vcz; Wed, 11 Sep 2013 03:17:12 -0700 (PDT) X-Received: by 10.68.197.3 with SMTP id iq3mr780912pbc.113.1378894631786; Wed, 11 Sep 2013 03:17:11 -0700 (PDT) Received: from mail-pb0-f51.google.com (mail-pb0-f51.google.com [209.85.160.51]) by mx.google.com with ESMTPS id r5si4550682pbj.271.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 11 Sep 2013 03:17:11 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.160.51 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.160.51; Received: by mail-pb0-f51.google.com with SMTP id jt11so8840351pbb.38 for ; Wed, 11 Sep 2013 03:17:11 -0700 (PDT) X-Received: by 10.66.218.198 with SMTP id pi6mr2697159pac.107.1378894631363; Wed, 11 Sep 2013 03:17:11 -0700 (PDT) Received: from localhost ([27.57.128.127]) by mx.google.com with ESMTPSA id fa4sm2535457pab.17.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 11 Sep 2013 03:17:10 -0700 (PDT) From: Viresh Kumar To: rjw@sisk.pl Cc: linaro-kernel@lists.linaro.org, patches@linaro.org, cpufreq@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Viresh Kumar Subject: [PATCH 2/5] cpufreq: rename __cpufreq_set_policy() as cpufreq_set_policy() Date: Wed, 11 Sep 2013 15:43:08 +0530 Message-Id: <47fe5de177e308bae5035aac60fad8d5d3730c79.1378893296.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 1.7.12.rc2.18.g61b472e In-Reply-To: References: In-Reply-To: References: X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: viresh.kumar@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.53 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Earlier there used to be two functions named __cpufreq_set_policy() and cpufreq_set_policy(), but now we only have a single routine lets name it cpufreq_set_policy() instead of __cpufreq_set_policy(). This also removes some invalid comments or fixes some incorrect comments. Signed-off-by: Viresh Kumar --- drivers/cpufreq/cpufreq.c | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 5a64f66..749bf06 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -414,7 +414,7 @@ show_one(scaling_min_freq, min); show_one(scaling_max_freq, max); show_one(scaling_cur_freq, cur); -static int __cpufreq_set_policy(struct cpufreq_policy *policy, +static int cpufreq_set_policy(struct cpufreq_policy *policy, struct cpufreq_policy *new_policy); /** @@ -435,7 +435,7 @@ static ssize_t store_##file_name \ if (ret != 1) \ return -EINVAL; \ \ - ret = __cpufreq_set_policy(policy, &new_policy); \ + ret = cpufreq_set_policy(policy, &new_policy); \ policy->user_policy.object = policy->object; \ \ return ret ? ret : count; \ @@ -493,11 +493,7 @@ static ssize_t store_scaling_governor(struct cpufreq_policy *policy, &new_policy.governor)) return -EINVAL; - /* - * Do not use cpufreq_set_policy here or the user_policy.max - * will be wrongly overridden - */ - ret = __cpufreq_set_policy(policy, &new_policy); + ret = cpufreq_set_policy(policy, &new_policy); policy->user_policy.policy = policy->policy; policy->user_policy.governor = policy->governor; @@ -844,11 +840,11 @@ static void cpufreq_init_policy(struct cpufreq_policy *policy) int ret = 0; memcpy(&new_policy, policy, sizeof(*policy)); - /* assure that the starting sequence is run in __cpufreq_set_policy */ + /* assure that the starting sequence is run in cpufreq_set_policy */ policy->governor = NULL; /* set default policy */ - ret = __cpufreq_set_policy(policy, &new_policy); + ret = cpufreq_set_policy(policy, &new_policy); policy->user_policy.policy = policy->policy; policy->user_policy.governor = policy->governor; @@ -1844,10 +1840,10 @@ int cpufreq_get_policy(struct cpufreq_policy *policy, unsigned int cpu) EXPORT_SYMBOL(cpufreq_get_policy); /* - * data : current policy. - * policy : policy to be set. + * policy : current policy. + * new_policy: policy to be set. */ -static int __cpufreq_set_policy(struct cpufreq_policy *policy, +static int cpufreq_set_policy(struct cpufreq_policy *policy, struct cpufreq_policy *new_policy) { int ret = 0, failed = 1; @@ -1996,7 +1992,7 @@ int cpufreq_update_policy(unsigned int cpu) } } - ret = __cpufreq_set_policy(policy, &new_policy); + ret = cpufreq_set_policy(policy, &new_policy); unlock_policy_rwsem_write(cpu);