[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220306021250.64315-2-zhanglianjie@uniontech.com>
Date: Sun, 6 Mar 2022 10:12:50 +0800
From: zhanglianjie <zhanglianjie@...ontech.com>
To: "Rafael J. Wysocki" <rafael@...nel.org>
Cc: Viresh Kumar <viresh.kumar@...aro.org>, linux-pm@...r.kernel.org,
linux-kernel@...r.kernel.org,
zhanglianjie <zhanglianjie@...ontech.com>
Subject: [PATCH 2/2] cpufreq: use helper macro __ATTR_XX
Use helper macro __ATTR_XX to make code more clear.
Minor readability improvement.
Signed-off-by: zhanglianjie <zhanglianjie@...ontech.com>
diff --git a/drivers/cpufreq/cpufreq_governor.h b/drivers/cpufreq/cpufreq_governor.h
index 65ecf32ba4f8..a5a0bc3cc23e 100644
--- a/drivers/cpufreq/cpufreq_governor.h
+++ b/drivers/cpufreq/cpufreq_governor.h
@@ -68,12 +68,10 @@ static ssize_t file_name##_show \
}
#define gov_attr_ro(_name) \
-static struct governor_attr _name = \
-__ATTR(_name, 0444, _name##_show, NULL)
+static struct governor_attr _name = __ATTR_RO(_name)
#define gov_attr_rw(_name) \
-static struct governor_attr _name = \
-__ATTR(_name, 0644, _name##_show, _name##_store)
+static struct governor_attr _name = __ATTR_RW(_name)
/* Common to all CPUs of a policy */
struct policy_dbs_info {
--
2.20.1
Powered by blists - more mailing lists