From patchwork Thu Oct 3 15:56:55 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 20805 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f71.google.com (mail-yh0-f71.google.com [209.85.213.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id AAB7D25CAB for ; Thu, 3 Oct 2013 15:58:50 +0000 (UTC) Received: by mail-yh0-f71.google.com with SMTP id f73sf3554653yha.10 for ; Thu, 03 Oct 2013 08:58:50 -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=yM9KgmLqELfaKIfsepVM49qmqHw0D5FsBXUjlC9BhnE=; b=HBZ+77yGS+JX0pWw8Hw6U6ifryrv6xZfjlUhPq2wu7k/tG2kjTqf16/AEfEQOyDRzS GxZ5iSxWESrQz0739lJ7W2A958Z0zNoDhs6ELRcm5lJMhL5i3rqGbe1tY59FsNF6O4Fi mg9N3Me8ksedSs7YOnvDAPbJBarUlzIDRul2n6EA9qJbt0u+2Tro52BGyOjn5l952PL3 B0f4kr3GVX5IH0OEAHt+gNslomtiuf3vNMzUjI7t88Pvz52OP29T6Ts/GENFwk+4WuIV bNyZq3ShiD4kH2td3SpYZ/qi9yN85iQ75qa/3JoO3uBu+MP5KWWPMm0+Zc4TTFqS2vlo ld5A== X-Received: by 10.236.145.34 with SMTP id o22mr7764942yhj.22.1380815930482; Thu, 03 Oct 2013 08:58:50 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.50.169 with SMTP id d9ls974532qeo.21.gmail; Thu, 03 Oct 2013 08:58:50 -0700 (PDT) X-Received: by 10.221.40.10 with SMTP id to10mr2298202vcb.22.1380815930354; Thu, 03 Oct 2013 08:58:50 -0700 (PDT) Received: from mail-ve0-f175.google.com (mail-ve0-f175.google.com [209.85.128.175]) by mx.google.com with ESMTPS id i15si1888908vep.54.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 03 Oct 2013 08:58:50 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.175 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.175; Received: by mail-ve0-f175.google.com with SMTP id jy13so1799716veb.6 for ; Thu, 03 Oct 2013 08:58:50 -0700 (PDT) X-Gm-Message-State: ALoCoQnL3l171WNn3vU8saqqLUzKh5/o7QojHWqoFhEseY0/9sxGG4SU/rS+XVZOdjXRZekr2uw7 X-Received: by 10.52.243.138 with SMTP id wy10mr6813057vdc.2.1380815930243; Thu, 03 Oct 2013 08:58:50 -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 u4csp189277vcz; Thu, 3 Oct 2013 08:58:49 -0700 (PDT) X-Received: by 10.68.195.36 with SMTP id ib4mr9412908pbc.56.1380815929364; Thu, 03 Oct 2013 08:58:49 -0700 (PDT) Received: from mail-pa0-f48.google.com (mail-pa0-f48.google.com [209.85.220.48]) by mx.google.com with ESMTPS id rq5si6094336pbc.33.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 03 Oct 2013 08:58:49 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.48 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.220.48; Received: by mail-pa0-f48.google.com with SMTP id bj1so2801713pad.21 for ; Thu, 03 Oct 2013 08:58:48 -0700 (PDT) X-Received: by 10.68.115.15 with SMTP id jk15mr9482426pbb.36.1380815928656; Thu, 03 Oct 2013 08:58:48 -0700 (PDT) Received: from localhost ([122.167.152.64]) by mx.google.com with ESMTPSA id xv2sm9033562pbb.39.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 03 Oct 2013 08:58:48 -0700 (PDT) From: Viresh Kumar To: rjw@sisk.pl, daniel.lezcano@linaro.org Cc: linaro-kernel@lists.linaro.org, patches@linaro.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Viresh Kumar Subject: [PATCH V2 16/16] cpuidle: remove cpuidle_unregister_governor() Date: Thu, 3 Oct 2013 21:26:55 +0530 Message-Id: <37fdfe53136ec441698be7371a1c8b541014d969.1380815504.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.128.175 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: , cpuidle_unregister_governor() and cpuidle_replace_governor() routines aren't used anymore and so can be removed. These were used by cpufreq governors earlier, which can't be compiled in as modules anymore and so these are useless. Suggested-by: Daniel Lezcano Signed-off-by: Viresh Kumar --- Documentation/cpuidle/governor.txt | 1 - drivers/cpuidle/governor.c | 43 -------------------------------------- include/linux/cpuidle.h | 6 ------ 3 files changed, 50 deletions(-) diff --git a/Documentation/cpuidle/governor.txt b/Documentation/cpuidle/governor.txt index 12c6bd5..d9020f5 100644 --- a/Documentation/cpuidle/governor.txt +++ b/Documentation/cpuidle/governor.txt @@ -25,5 +25,4 @@ kernel configuration and platform will be selected by cpuidle. Interfaces: extern int cpuidle_register_governor(struct cpuidle_governor *gov); -extern void cpuidle_unregister_governor(struct cpuidle_governor *gov); struct cpuidle_governor diff --git a/drivers/cpuidle/governor.c b/drivers/cpuidle/governor.c index ea2f8e7..ca89412 100644 --- a/drivers/cpuidle/governor.c +++ b/drivers/cpuidle/governor.c @@ -96,46 +96,3 @@ int cpuidle_register_governor(struct cpuidle_governor *gov) return ret; } - -/** - * cpuidle_replace_governor - find a replacement governor - * @exclude_rating: the rating that will be skipped while looking for - * new governor. - */ -static struct cpuidle_governor *cpuidle_replace_governor(int exclude_rating) -{ - struct cpuidle_governor *gov; - struct cpuidle_governor *ret_gov = NULL; - unsigned int max_rating = 0; - - list_for_each_entry(gov, &cpuidle_governors, governor_list) { - if (gov->rating == exclude_rating) - continue; - if (gov->rating > max_rating) { - max_rating = gov->rating; - ret_gov = gov; - } - } - - return ret_gov; -} - -/** - * cpuidle_unregister_governor - unregisters a governor - * @gov: the governor - */ -void cpuidle_unregister_governor(struct cpuidle_governor *gov) -{ - if (!gov) - return; - - mutex_lock(&cpuidle_lock); - if (gov == cpuidle_curr_governor) { - struct cpuidle_governor *new_gov; - new_gov = cpuidle_replace_governor(gov->rating); - cpuidle_switch_governor(new_gov); - } - list_del(&gov->governor_list); - mutex_unlock(&cpuidle_lock); -} - diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h index c082425..50fcbb0 100644 --- a/include/linux/cpuidle.h +++ b/include/linux/cpuidle.h @@ -195,16 +195,10 @@ struct cpuidle_governor { }; #ifdef CONFIG_CPU_IDLE - extern int cpuidle_register_governor(struct cpuidle_governor *gov); -extern void cpuidle_unregister_governor(struct cpuidle_governor *gov); - #else - static inline int cpuidle_register_governor(struct cpuidle_governor *gov) {return 0;} -static inline void cpuidle_unregister_governor(struct cpuidle_governor *gov) { } - #endif #ifdef CONFIG_ARCH_HAS_CPU_RELAX