From patchwork Tue Feb 2 10:57:23 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 61006 Delivered-To: patch@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp651143lbb; Tue, 2 Feb 2016 02:58:07 -0800 (PST) X-Received: by 10.98.65.206 with SMTP id g75mr21357366pfd.94.1454410687434; Tue, 02 Feb 2016 02:58:07 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id uh6si1296141pab.3.2016.02.02.02.58.07; Tue, 02 Feb 2016 02:58:07 -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 S1754780AbcBBK5z (ORCPT + 30 others); Tue, 2 Feb 2016 05:57:55 -0500 Received: from mail-pf0-f170.google.com ([209.85.192.170]:35174 "EHLO mail-pf0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754499AbcBBK5w (ORCPT ); Tue, 2 Feb 2016 05:57:52 -0500 Received: by mail-pf0-f170.google.com with SMTP id 65so101420176pfd.2 for ; Tue, 02 Feb 2016 02:57:52 -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=jdos/a0oX9wmnYKbe3AnMlFqQrNjFZIEt84c3Y/L5NQ=; b=gimzB13RXDyYnGaQnmoZla3FYzcDqEGXZGXo+0OZK+KmTjz2v/6vFoh+R4HSkYGp0w fctFBwITCg7oujaruaRGibcqsanSJ89/5ZX1G+C8AFLpRVw+49ipuDdzYxwm+1LWWEtM L6nSgVycESaWqrD16jW33Wdexs/s8hBVfR2k0= 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=jdos/a0oX9wmnYKbe3AnMlFqQrNjFZIEt84c3Y/L5NQ=; b=L+mv88cBY7z91CngExrkBVsmGXJI+h9dSJZmpgFJ5SKaP/1QoqDo3/BsKyCkw/B8gW xUWEi1uhHPcLykNNwEO/U/3AC8kjhadgf5hCOInhpWznXh6+jJmMuBGh7RbmvilFHyND Fo2+oQxnEeNciXzxTNZrlGA0JBb1h8ur7L+G6QciMc3vfrOXrmYuT1WejXegMi7kE2ey o0cc5Yl6NTzH+NG723oobTzCJnmopjYkZfWKx8CSNJ6I2j0grCcNhTgAX2DmW4e+vyDw KfBQC6V8nez27jB9vdjwwGZDgLK3QT6TQuvlPk6FHG2ND9K1f2ptVvSA/CLxk/JkSHPh PYtA== X-Gm-Message-State: AG10YOR45D8/jZMfayU48cnIWtJtkPSdCv13hDevq6WgFLH9tTn0cZn/RfkdoSP9tvWLCDfj X-Received: by 10.98.42.135 with SMTP id q129mr45790216pfq.13.1454410671914; Tue, 02 Feb 2016 02:57:51 -0800 (PST) Received: from localhost ([122.172.22.246]) by smtp.gmail.com with ESMTPSA id d21sm1810173pfj.32.2016.02.02.02.57.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 Feb 2016 02:57:51 -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 3/5] cpufreq: governor: Remove unused sysfs attribute macros Date: Tue, 2 Feb 2016 16:27:23 +0530 Message-Id: <5f27ff5cdfd19ca159abc87ad2b52b949e1e4dbc.1454410226.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 older macros aren't used anymore, remove them. 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 59b28133dd68..5a7de52815c4 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 {