From patchwork Thu Jan 5 04:47:27 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 9498363 X-Patchwork-Delegate: rjw@sisk.pl Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id DF2F060235 for ; Thu, 5 Jan 2017 04:48:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E471526224 for ; Thu, 5 Jan 2017 04:48:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D964F27F8D; Thu, 5 Jan 2017 04:48:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5D13A26224 for ; Thu, 5 Jan 2017 04:48:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754139AbdAEErl (ORCPT ); Wed, 4 Jan 2017 23:47:41 -0500 Received: from mail-pg0-f54.google.com ([74.125.83.54]:35064 "EHLO mail-pg0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753226AbdAEEri (ORCPT ); Wed, 4 Jan 2017 23:47:38 -0500 Received: by mail-pg0-f54.google.com with SMTP id i5so170634722pgh.2 for ; Wed, 04 Jan 2017 20:47:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=PgLr5FuHQARa7gULhDwV2tc0or01sJ9bN2b9rduanak=; b=gEyvm8Qs/SQu4KcPhw5CvsEMRx+WnJ+q/007+b61Aq9ijwHLz6scDwIv3Co+wIxYOe ZplmA7jTffrQcsDA688vCbfYtyLwFICAtsY+lvWznMESogOahOdHDT1Gz7Fj0UwBz6dC /LjQp5Gt2ucgWz68G8bDWhW+2zv18uB92lrEE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=PgLr5FuHQARa7gULhDwV2tc0or01sJ9bN2b9rduanak=; b=hay0eRokhWhYfthW1kmS/qnY8QboRk9MWJiT34/ANeUaFPae6dB5VpD3b/1A+U4bfp Z4FyphB0EQkxm7MxqmwG0gnSRRQFrUndO5fvQS01oAxNn60+I8v8XN5a6DBfXJWRZBcE GiWOUIF/0rnJybfdy5alDMsfQItbBy4+SxLzW6I2bnclA+uOLSroMB5uBYXN26516May LQ8lqSRPNzakbjwQbtcnhUlzOV7MF58nrxw0FRdaqM8bdjgDBQyxTuVw08ixRjYaOa+d r8HT9YBuzDb8lKkwL0dfmDPDjBYO9+VNe6VPw+mTvIBd+fNswUAslS3miWO3LfWFCmxD CObg== X-Gm-Message-State: AIkVDXKQXMG3pPN6Rp7zSPMkp6ybDwaiRhzpwaH6etJAo600Lmcj0FdRZXU3LkObuCEfid9b X-Received: by 10.98.96.135 with SMTP id u129mr64817724pfb.141.1483591657452; Wed, 04 Jan 2017 20:47:37 -0800 (PST) Received: from localhost ([122.171.77.55]) by smtp.gmail.com with ESMTPSA id s136sm697994pgc.38.2017.01.04.20.47.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 04 Jan 2017 20:47:36 -0800 (PST) From: Viresh Kumar To: Rafael Wysocki , Viresh Kumar Cc: linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Vincent Guittot Subject: [PATCH] cpufreq: Remove policy create/remove notifiers Date: Thu, 5 Jan 2017 10:17:27 +0530 Message-Id: X-Mailer: git-send-email 2.7.1.410.g6faf27b Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Those were added by: commit fcd7af917abb ("cpufreq: stats: handle cpufreq_unregister_driver() and suspend/resume properly") but aren't used anymore since: commit 1aefc75b2449 ("cpufreq: stats: Make the stats code non-modular"). Remove them. Also remove the redundant parameter to the respective routines. Signed-off-by: Viresh Kumar --- drivers/cpufreq/cpufreq.c | 16 +++++----------- include/linux/cpufreq.h | 2 -- 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index cc475eff90b3..53268bebdf1e 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -1078,15 +1078,11 @@ static struct cpufreq_policy *cpufreq_policy_alloc(unsigned int cpu) return NULL; } -static void cpufreq_policy_put_kobj(struct cpufreq_policy *policy, bool notify) +static void cpufreq_policy_put_kobj(struct cpufreq_policy *policy) { struct kobject *kobj; struct completion *cmp; - if (notify) - blocking_notifier_call_chain(&cpufreq_policy_notifier_list, - CPUFREQ_REMOVE_POLICY, policy); - down_write(&policy->rwsem); cpufreq_stats_free_table(policy); kobj = &policy->kobj; @@ -1104,7 +1100,7 @@ static void cpufreq_policy_put_kobj(struct cpufreq_policy *policy, bool notify) pr_debug("wait complete\n"); } -static void cpufreq_policy_free(struct cpufreq_policy *policy, bool notify) +static void cpufreq_policy_free(struct cpufreq_policy *policy) { unsigned long flags; int cpu; @@ -1117,7 +1113,7 @@ static void cpufreq_policy_free(struct cpufreq_policy *policy, bool notify) per_cpu(cpufreq_cpu_data, cpu) = NULL; write_unlock_irqrestore(&cpufreq_driver_lock, flags); - cpufreq_policy_put_kobj(policy, notify); + cpufreq_policy_put_kobj(policy); free_cpumask_var(policy->real_cpus); free_cpumask_var(policy->related_cpus); free_cpumask_var(policy->cpus); @@ -1244,8 +1240,6 @@ static int cpufreq_online(unsigned int cpu) goto out_exit_policy; cpufreq_stats_create_table(policy); - blocking_notifier_call_chain(&cpufreq_policy_notifier_list, - CPUFREQ_CREATE_POLICY, policy); write_lock_irqsave(&cpufreq_driver_lock, flags); list_add(&policy->policy_list, &cpufreq_policy_list); @@ -1282,7 +1276,7 @@ static int cpufreq_online(unsigned int cpu) if (cpufreq_driver->exit) cpufreq_driver->exit(policy); out_free_policy: - cpufreq_policy_free(policy, !new_policy); + cpufreq_policy_free(policy); return ret; } @@ -1403,7 +1397,7 @@ static void cpufreq_remove_dev(struct device *dev, struct subsys_interface *sif) remove_cpu_dev_symlink(policy, dev); if (cpumask_empty(policy->real_cpus)) - cpufreq_policy_free(policy, true); + cpufreq_policy_free(policy); } /** diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index 30feeb34963e..0183986b3ba6 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h @@ -416,8 +416,6 @@ static inline void cpufreq_resume(void) {} #define CPUFREQ_ADJUST (0) #define CPUFREQ_NOTIFY (1) #define CPUFREQ_START (2) -#define CPUFREQ_CREATE_POLICY (3) -#define CPUFREQ_REMOVE_POLICY (4) #ifdef CONFIG_CPU_FREQ int cpufreq_register_notifier(struct notifier_block *nb, unsigned int list);