From patchwork Fri Jan 2 07:04:31 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 42682 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f197.google.com (mail-lb0-f197.google.com [209.85.217.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 5E1CE26CD1 for ; Fri, 2 Jan 2015 07:05:39 +0000 (UTC) Received: by mail-lb0-f197.google.com with SMTP id w7sf10311089lbi.0 for ; Thu, 01 Jan 2015 23:05:38 -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=p9Y1RRZxy4BLinuLtL8m8dKrHfA3YOm5exg2s4xovKk=; b=KCSKEoVJVQWFCIf7Uf0XAcdCfcWmhMUTPNUtDe/H/IJiVrB6PrffbLi8na+jljqbzH wDQraZt1LX6/+abb2joj11lATzypTJJwHKfSYy7/ErJH117aBVD8n8hpTOAZSPS2uzRJ tn4IqqpF2OG8wJxfOeDXOYOQWzz5vPIZAtpB9EZacPt3ZiqtbMb8M7/j78V1pl+3p5sZ gdyO2dHwuKF23Q8ZosFHNZ4VtSVMk+EXyOGcrpiXxiI+2slJeRoTr3XXryR96NgZHLfq 8pHyn5fCMyWThv/BDHn9z1Yq4Q5Jm+TbYBCtVldrAJb5Fq572CXkKyBKDgoUbJ/5nr7v sUuw== X-Gm-Message-State: ALoCoQn1yIfR5gsCltaUelPmBu2xiX2xpTfxyeCU8c4a2G/ol3InNJiSX9vT9D0UaPn/ed4z7m+4 X-Received: by 10.152.10.233 with SMTP id l9mr8599455lab.0.1420182337881; Thu, 01 Jan 2015 23:05:37 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.170.131 with SMTP id am3ls184156lac.47.gmail; Thu, 01 Jan 2015 23:05:37 -0800 (PST) X-Received: by 10.152.6.41 with SMTP id x9mr74008296lax.86.1420182337426; Thu, 01 Jan 2015 23:05:37 -0800 (PST) Received: from mail-la0-f45.google.com (mail-la0-f45.google.com. [209.85.215.45]) by mx.google.com with ESMTPS id js7si50447988lbc.58.2015.01.01.23.05.37 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 01 Jan 2015 23:05:37 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.45 as permitted sender) client-ip=209.85.215.45; Received: by mail-la0-f45.google.com with SMTP id gq15so15401787lab.18 for ; Thu, 01 Jan 2015 23:05:37 -0800 (PST) X-Received: by 10.152.87.100 with SMTP id w4mr75078223laz.71.1420182337348; Thu, 01 Jan 2015 23:05:37 -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.9.200 with SMTP id c8csp126174lbb; Thu, 1 Jan 2015 23:05:36 -0800 (PST) X-Received: by 10.68.68.206 with SMTP id y14mr118979142pbt.165.1420182335510; Thu, 01 Jan 2015 23:05:35 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id dl1si29047854pbb.67.2015.01.01.23.05.33; Thu, 01 Jan 2015 23:05:35 -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 S1750758AbbABHFd (ORCPT + 12 others); Fri, 2 Jan 2015 02:05:33 -0500 Received: from mail-pd0-f170.google.com ([209.85.192.170]:50159 "EHLO mail-pd0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750744AbbABHFc (ORCPT ); Fri, 2 Jan 2015 02:05:32 -0500 Received: by mail-pd0-f170.google.com with SMTP id v10so23378311pde.29 for ; Thu, 01 Jan 2015 23:05:32 -0800 (PST) X-Received: by 10.70.103.197 with SMTP id fy5mr121180093pdb.131.1420182332307; Thu, 01 Jan 2015 23:05:32 -0800 (PST) Received: from localhost ([122.167.116.151]) by mx.google.com with ESMTPSA id hj2sm45529057pbc.69.2015.01.01.23.05.31 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 01 Jan 2015 23:05:31 -0800 (PST) From: Viresh Kumar To: Rafael Wysocki Cc: linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org, prarit@redhat.com, skannan@codeaurora.org, Viresh Kumar Subject: [PATCH 10/17] cpufreq: get rid of CONFIG_{HOTPLUG_CPU|SMP} mess Date: Fri, 2 Jan 2015 12:34:31 +0530 Message-Id: X-Mailer: git-send-email 2.2.0 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.215.45 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: , These are messing up more than the benefit they provide. It isn't a lot of code anyway, that we will compile without them. Kill them. Signed-off-by: Viresh Kumar --- drivers/cpufreq/cpufreq.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 9595107477a6..3893c87739d1 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -957,7 +957,6 @@ static void cpufreq_init_policy(struct cpufreq_policy *policy) } } -#ifdef CONFIG_HOTPLUG_CPU static int cpufreq_add_policy_cpu(struct cpufreq_policy *policy, unsigned int cpu, struct device *dev) { @@ -995,7 +994,6 @@ static int cpufreq_add_policy_cpu(struct cpufreq_policy *policy, return sysfs_create_link(&dev->kobj, &policy->kobj, "cpufreq"); } -#endif static struct cpufreq_policy *cpufreq_policy_restore(unsigned int cpu) { @@ -1100,19 +1098,15 @@ static int __cpufreq_add_dev(struct device *dev, struct subsys_interface *sif) { unsigned int j, cpu = dev->id; int ret = -ENOMEM; - struct cpufreq_policy *policy; + struct cpufreq_policy *policy, *tpolicy; unsigned long flags; bool recover_policy = cpufreq_suspended; -#ifdef CONFIG_HOTPLUG_CPU - struct cpufreq_policy *tpolicy; -#endif if (cpu_is_offline(cpu)) return 0; pr_debug("adding CPU %u\n", cpu); -#ifdef CONFIG_SMP /* check whether a different CPU already registered this * CPU because it is in the same boat. */ policy = cpufreq_cpu_get(cpu); @@ -1120,12 +1114,10 @@ static int __cpufreq_add_dev(struct device *dev, struct subsys_interface *sif) cpufreq_cpu_put(policy); return 0; } -#endif if (!down_read_trylock(&cpufreq_rwsem)) return 0; -#ifdef CONFIG_HOTPLUG_CPU /* Check if this cpu was hot-unplugged earlier and has siblings */ read_lock_irqsave(&cpufreq_driver_lock, flags); list_for_each_entry(tpolicy, &cpufreq_policy_list, policy_list) { @@ -1137,7 +1129,6 @@ static int __cpufreq_add_dev(struct device *dev, struct subsys_interface *sif) } } read_unlock_irqrestore(&cpufreq_driver_lock, flags); -#endif /* * Restore the saved policy when doing light-weight init and fall back