From patchwork Wed Feb 3 14:02:19 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 61097 Delivered-To: patch@linaro.org Received: by 10.112.43.199 with SMTP id y7csp311514lbl; Wed, 3 Feb 2016 06:04:35 -0800 (PST) X-Received: by 10.66.102.40 with SMTP id fl8mr2408168pab.136.1454508275275; Wed, 03 Feb 2016 06:04:35 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id dg7si9550602pad.75.2016.02.03.06.04.34; Wed, 03 Feb 2016 06:04:35 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dkim=pass header.i=@linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932863AbcBCOE3 (ORCPT + 30 others); Wed, 3 Feb 2016 09:04:29 -0500 Received: from mail-pf0-f170.google.com ([209.85.192.170]:34403 "EHLO mail-pf0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932329AbcBCOCk (ORCPT ); Wed, 3 Feb 2016 09:02:40 -0500 Received: by mail-pf0-f170.google.com with SMTP id o185so14437983pfb.1 for ; Wed, 03 Feb 2016 06:02:39 -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:in-reply-to:references :in-reply-to:references; bh=TwuBXtdX0hIzlh/PZxBAjYP2gCvzoPLkeZ00m37LDjY=; b=dupJdEJBy2x2/XcN6jS4Z2xKiy77KGfgUS5/VeQNQqffCfb8EcC/Vj60qLhcXUvNIN AKR1MdjpY+Hs42Sq9Fa/jh/7CvFE0LVGh4m0Ax6526Y1xeG0E8PbxWIYF5q2aA1SlmLJ XgVFBnOL8B9F7WO/KrLKSPhs28aAQdANYrOVo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=TwuBXtdX0hIzlh/PZxBAjYP2gCvzoPLkeZ00m37LDjY=; b=LaT5M1foEf1Z3CoolN9UZt3FWLsbLzhWiGLgqCd7k80NRD53mzLkFzjyqxQKKzcW3j qi1T+B5orFmBtoO9ioARsOC31H/HQufjRBTO8Uhsldk0urteGQE6nUdsWuJkXNtd1naV zgNEhRCfNtg6nLvPmxQIjkLq2vYe1FfVXiGBuutCVc2/p+8NxLARIPDybKT33X3YtKyC tcEW184prBeYqf2gSLcz4kpVbzdJwO8SdZsWsZLbGX+kmdRu30jvZ3Yk5MlYnkUZIxOB BHPEyORYJRPUuRJv/1FwHmPUnx0rZLLHB9YH/LbtXZtOb/5WmmzYTm8etUYMuWAsi2eR TujA== X-Gm-Message-State: AG10YOR+gDqFG1ff+mm2IOPciwaGB9wCe1vqNFtAApVSb16Jx35BRNKEwx3oJl5xHbCMobQV X-Received: by 10.98.69.78 with SMTP id s75mr2425795pfa.102.1454508159468; Wed, 03 Feb 2016 06:02:39 -0800 (PST) Received: from localhost ([122.172.22.246]) by smtp.gmail.com with ESMTPSA id x10sm10158080pas.37.2016.02.03.06.02.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 03 Feb 2016 06:02:38 -0800 (PST) From: Viresh Kumar To: Rafael Wysocki , juri.lelli@arm.com Cc: linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org, skannan@codeaurora.org, peterz@infradead.org, mturquette@baylibre.com, steve.muckle@linaro.org, vincent.guittot@linaro.org, morten.rasmussen@arm.com, dietmar.eggemann@arm.com, linux-kernel@vger.kernel.org, Viresh Kumar Subject: [PATCH V2 3/7] cpufreq: governor: Drop unused macros for creating governor tunable attributes Date: Wed, 3 Feb 2016 19:32:19 +0530 Message-Id: <5c470e56bd2dbaec62624fb70e321c1d3f084ad2.1454507872.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.7.0.79.gdc08a19 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org "The previous commit introduced a new set of macros for creating sysfs attributes that represent governor tunables and the old macros used for this purpose are not needed any more, so drop them." [ Rafael: Written changelog ] Signed-off-by: Viresh Kumar --- drivers/cpufreq/cpufreq_governor.h | 68 -------------------------------------- 1 file changed, 68 deletions(-) -- 2.7.0.79.gdc08a19 diff --git a/drivers/cpufreq/cpufreq_governor.h b/drivers/cpufreq/cpufreq_governor.h index 45a6ac1ecfb0..ed328a39c4ac 100644 --- a/drivers/cpufreq/cpufreq_governor.h +++ b/drivers/cpufreq/cpufreq_governor.h @@ -40,74 +40,6 @@ /* Ondemand Sampling types */ enum {OD_NORMAL_SAMPLE, OD_SUB_SAMPLE}; -/* - * Macro for creating governors sysfs routines - * - * - gov_sys: One governor instance per whole system - * - gov_pol: One governor instance per policy - */ - -/* Create attributes */ -#define gov_sys_attr_ro(_name) \ -static struct global_attr _name##_gov_sys = \ -__ATTR(_name, 0444, show_##_name##_gov_sys, NULL) - -#define gov_sys_attr_rw(_name) \ -static struct global_attr _name##_gov_sys = \ -__ATTR(_name, 0644, show_##_name##_gov_sys, store_##_name##_gov_sys) - -#define gov_pol_attr_ro(_name) \ -static struct freq_attr _name##_gov_pol = \ -__ATTR(_name, 0444, show_##_name##_gov_pol, NULL) - -#define gov_pol_attr_rw(_name) \ -static struct freq_attr _name##_gov_pol = \ -__ATTR(_name, 0644, show_##_name##_gov_pol, store_##_name##_gov_pol) - -#define gov_sys_pol_attr_rw(_name) \ - gov_sys_attr_rw(_name); \ - gov_pol_attr_rw(_name) - -#define gov_sys_pol_attr_ro(_name) \ - gov_sys_attr_ro(_name); \ - gov_pol_attr_ro(_name) - -/* Create show/store routines */ -#define show_one(_gov, file_name) \ -static ssize_t show_##file_name##_gov_sys \ -(struct kobject *kobj, struct attribute *attr, char *buf) \ -{ \ - struct _gov##_dbs_tuners *tuners = _gov##_dbs_cdata.gdbs_data->tuners; \ - return sprintf(buf, "%u\n", tuners->file_name); \ -} \ - \ -static ssize_t show_##file_name##_gov_pol \ -(struct cpufreq_policy *policy, char *buf) \ -{ \ - struct dbs_data *dbs_data = policy->governor_data; \ - struct _gov##_dbs_tuners *tuners = dbs_data->tuners; \ - return sprintf(buf, "%u\n", tuners->file_name); \ -} - -#define store_one(_gov, file_name) \ -static ssize_t store_##file_name##_gov_sys \ -(struct kobject *kobj, struct attribute *attr, const char *buf, size_t count) \ -{ \ - struct dbs_data *dbs_data = _gov##_dbs_cdata.gdbs_data; \ - return store_##file_name(dbs_data, buf, count); \ -} \ - \ -static ssize_t store_##file_name##_gov_pol \ -(struct cpufreq_policy *policy, const char *buf, size_t count) \ -{ \ - struct dbs_data *dbs_data = policy->governor_data; \ - return store_##file_name(dbs_data, buf, count); \ -} - -#define show_store_one(_gov, file_name) \ -show_one(_gov, file_name); \ -store_one(_gov, file_name) - /* Governor's specific attributes */ struct dbs_data; struct governor_attr {