@@ -76,20 +76,6 @@ static ssize_t store_attr(struct uncore_data *data, const char *buf, ssize_t cou
76
76
return count ;
77
77
}
78
78
79
- static ssize_t show_perf_status_freq_khz (struct uncore_data * data , char * buf )
80
- {
81
- unsigned int freq ;
82
- int ret ;
83
-
84
- mutex_lock (& uncore_lock );
85
- ret = uncore_read (data , & freq , UNCORE_INDEX_CURRENT_FREQ );
86
- mutex_unlock (& uncore_lock );
87
- if (ret )
88
- return ret ;
89
-
90
- return sprintf (buf , "%u\n" , freq );
91
- }
92
-
93
79
#define store_uncore_attr (name , index ) \
94
80
static ssize_t store_##name(struct kobject *kobj, \
95
81
struct kobj_attribute *attr, \
@@ -109,22 +95,13 @@ static ssize_t show_perf_status_freq_khz(struct uncore_data *data, char *buf)
109
95
return show_attr(data, buf, index); \
110
96
}
111
97
112
- #define show_uncore_perf_status (name ) \
113
- static ssize_t show_##name(struct kobject *kobj, \
114
- struct kobj_attribute *attr, char *buf)\
115
- { \
116
- struct uncore_data *data = container_of(attr, struct uncore_data, name##_kobj_attr);\
117
- \
118
- return show_perf_status_freq_khz(data, buf); \
119
- }
120
-
121
98
store_uncore_attr (min_freq_khz , UNCORE_INDEX_MIN_FREQ );
122
99
store_uncore_attr (max_freq_khz , UNCORE_INDEX_MAX_FREQ );
123
100
124
101
show_uncore_attr (min_freq_khz , UNCORE_INDEX_MIN_FREQ );
125
102
show_uncore_attr (max_freq_khz , UNCORE_INDEX_MAX_FREQ );
126
103
127
- show_uncore_perf_status (current_freq_khz );
104
+ show_uncore_attr (current_freq_khz , UNCORE_INDEX_CURRENT_FREQ );
128
105
129
106
#define show_uncore_data (member_name ) \
130
107
static ssize_t show_##member_name(struct kobject *kobj, \
0 commit comments