cpuidle: sysfs: Remove the unused define_one_r(o/w) macros
PATCH 1/2 cpuidle: sysfs: Remove the unused define_one_r(o/w) macros
The define_one_ro and define_one_rw macros are not used, remove it.
Signed-off-by Hanjun Guo <[email protected]>
--- drivers/cpuidle/sysfs.c | 5 ----- 1 file changed, 5 deletions(-)
drivers/cpuidle/sysfs.c +0 -5
@@ -167,11 +167,6 @@ struct cpuidle_attr {ssize_t (*store)(struct cpuidle_device *,const char *,size_t count); }; -#define define_one_ro (_name, show) \ - static struct cpuidle_attr attr_##_name = __ATTR(_name, 0444, show, NULL) -#define define_one_rw (_name, show, store) \ - static struct cpuidle_attr attr_##_name = __ATTR(_name, 0644, show, store) -#define attr_to_cpuidleattr (a) container_of(a, struct cpuidle_attr, attr)struct cpuidle_device_kobj {
Signature · 1 line
1.7.12.4
PATCH 2/2 cpuidle: sysfs: Minor coding style correction
Fix two minor coding style issues.
Signed-off-by Hanjun Guo <[email protected]>
--- drivers/cpuidle/sysfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/cpuidle/sysfs.c +2 -2
@@ -426,12 +426,12 @@ static inline void cpuidle_remove_s2idle_attr_group(struct cpuidle_state_kobj *k#define attr_to_stateattr (a) container_of(a, struct cpuidle_state_attr, attr)static ssize_t cpuidle_state_show (struct kobject *kobj,struct attribute *attr, -char * buf) +char *buf) {int ret = -EIO ;struct cpuidle_state *state =kobj_to_state (kobj);struct cpuidle_state_usage *state_usage =kobj_to_state_usage (kobj); -struct cpuidle_state_attr * cattr =attr_to_stateattr (attr); +struct cpuidle_state_attr *cattr =attr_to_stateattr (attr);if (cattr->show) ret = cattr->show (state, state_usage, buf);
Signature · 1 line
1.7.12.4
Quoted 16 lines · Hanjun Guo
The
define_one_roanddefine_one_rwmacros are not used, remove it.Signed-off-by Hanjun Guo <[email protected]>--- drivers/cpuidle/sysfs.c | 5 ----- 1 file changed, 5 deletions(-)drivers/cpuidle/sysfs.c +0
-0@@ -167,11 +167,6 @@ struct cpuidle_attr {ssize_t (*store)(struct cpuidle_device *,const char *,size_t count); };
drivers/cpuidle/sysfs.c struct cpuidle_attr {
Quoted 10 lines
drivers/cpuidle/sysfs.c +0
-6-#define define_one_ro (_name, show) \ - static struct cpuidle_attr attr_##_name = __ATTR(_name, 0444, show, NULL) -#define define_one_rw (_name, show, store) \ - static struct cpuidle_attr attr_##_name = __ATTR(_name, 0644, show, store) -#define attr_to_cpuidleattr (a) container_of(a, struct cpuidle_attr, attr)struct cpuidle_device_kobj { --
Applied as 5.8 material along with the [2/2], thanks!