[PATCH 2/2] cpufreq: use helper macro __ATTR_XX
From: zhanglianjie
Date: Sat Mar 05 2022 - 21:14:14 EST
Use helper macro __ATTR_XX to make code more clear.
Minor readability improvement.
Signed-off-by: zhanglianjie <zhanglianjie@xxxxxxxxxxxxx>
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