diff options
author | Daniel Lezcano <daniel.lezcano@linaro.org> | 2013-06-12 09:08:50 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-07-14 20:09:47 -0400 |
commit | f89ae89e2790341587f7132f0552c941342115e9 (patch) | |
tree | 09a097401f8198ab9cc90f52404b071be7b4e9f0 /drivers/cpuidle/sysfs.c | |
parent | 10b9d3f8a4d5c82bff5b232a0063669dc0e0d725 (diff) |
cpuidle: Fix white space to follow CodingStyle
Fix white space in the cpuidle code to follow the rules described in
CodingStyle.
No changes in behavior should result from this.
[rjw: Changelog]
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/cpuidle/sysfs.c')
-rw-r--r-- | drivers/cpuidle/sysfs.c | 38 |
1 files changed, 22 insertions, 16 deletions
diff --git a/drivers/cpuidle/sysfs.c b/drivers/cpuidle/sysfs.c index 428754af6236..7d4448a9fbbd 100644 --- a/drivers/cpuidle/sysfs.c +++ b/drivers/cpuidle/sysfs.c | |||
@@ -33,7 +33,8 @@ static ssize_t show_available_governors(struct device *dev, | |||
33 | 33 | ||
34 | mutex_lock(&cpuidle_lock); | 34 | mutex_lock(&cpuidle_lock); |
35 | list_for_each_entry(tmp, &cpuidle_governors, governor_list) { | 35 | list_for_each_entry(tmp, &cpuidle_governors, governor_list) { |
36 | if (i >= (ssize_t) ((PAGE_SIZE/sizeof(char)) - CPUIDLE_NAME_LEN - 2)) | 36 | if (i >= (ssize_t) ((PAGE_SIZE/sizeof(char)) - |
37 | CPUIDLE_NAME_LEN - 2)) | ||
37 | goto out; | 38 | goto out; |
38 | i += scnprintf(&buf[i], CPUIDLE_NAME_LEN, "%s ", tmp->name); | 39 | i += scnprintf(&buf[i], CPUIDLE_NAME_LEN, "%s ", tmp->name); |
39 | } | 40 | } |
@@ -168,11 +169,13 @@ struct cpuidle_attr { | |||
168 | 169 | ||
169 | #define kobj_to_cpuidledev(k) container_of(k, struct cpuidle_device, kobj) | 170 | #define kobj_to_cpuidledev(k) container_of(k, struct cpuidle_device, kobj) |
170 | #define attr_to_cpuidleattr(a) container_of(a, struct cpuidle_attr, attr) | 171 | #define attr_to_cpuidleattr(a) container_of(a, struct cpuidle_attr, attr) |
171 | static ssize_t cpuidle_show(struct kobject * kobj, struct attribute * attr ,char * buf) | 172 | |
173 | static ssize_t cpuidle_show(struct kobject *kobj, struct attribute *attr, | ||
174 | char *buf) | ||
172 | { | 175 | { |
173 | int ret = -EIO; | 176 | int ret = -EIO; |
174 | struct cpuidle_device *dev = kobj_to_cpuidledev(kobj); | 177 | struct cpuidle_device *dev = kobj_to_cpuidledev(kobj); |
175 | struct cpuidle_attr * cattr = attr_to_cpuidleattr(attr); | 178 | struct cpuidle_attr *cattr = attr_to_cpuidleattr(attr); |
176 | 179 | ||
177 | if (cattr->show) { | 180 | if (cattr->show) { |
178 | mutex_lock(&cpuidle_lock); | 181 | mutex_lock(&cpuidle_lock); |
@@ -182,12 +185,12 @@ static ssize_t cpuidle_show(struct kobject * kobj, struct attribute * attr ,char | |||
182 | return ret; | 185 | return ret; |
183 | } | 186 | } |
184 | 187 | ||
185 | static ssize_t cpuidle_store(struct kobject * kobj, struct attribute * attr, | 188 | static ssize_t cpuidle_store(struct kobject *kobj, struct attribute *attr, |
186 | const char * buf, size_t count) | 189 | const char *buf, size_t count) |
187 | { | 190 | { |
188 | int ret = -EIO; | 191 | int ret = -EIO; |
189 | struct cpuidle_device *dev = kobj_to_cpuidledev(kobj); | 192 | struct cpuidle_device *dev = kobj_to_cpuidledev(kobj); |
190 | struct cpuidle_attr * cattr = attr_to_cpuidleattr(attr); | 193 | struct cpuidle_attr *cattr = attr_to_cpuidleattr(attr); |
191 | 194 | ||
192 | if (cattr->store) { | 195 | if (cattr->store) { |
193 | mutex_lock(&cpuidle_lock); | 196 | mutex_lock(&cpuidle_lock); |
@@ -237,8 +240,8 @@ static ssize_t show_state_##_name(struct cpuidle_state *state, \ | |||
237 | 240 | ||
238 | #define define_store_state_ull_function(_name) \ | 241 | #define define_store_state_ull_function(_name) \ |
239 | static ssize_t store_state_##_name(struct cpuidle_state *state, \ | 242 | static ssize_t store_state_##_name(struct cpuidle_state *state, \ |
240 | struct cpuidle_state_usage *state_usage, \ | 243 | struct cpuidle_state_usage *state_usage, \ |
241 | const char *buf, size_t size) \ | 244 | const char *buf, size_t size) \ |
242 | { \ | 245 | { \ |
243 | unsigned long long value; \ | 246 | unsigned long long value; \ |
244 | int err; \ | 247 | int err; \ |
@@ -256,14 +259,16 @@ static ssize_t store_state_##_name(struct cpuidle_state *state, \ | |||
256 | 259 | ||
257 | #define define_show_state_ull_function(_name) \ | 260 | #define define_show_state_ull_function(_name) \ |
258 | static ssize_t show_state_##_name(struct cpuidle_state *state, \ | 261 | static ssize_t show_state_##_name(struct cpuidle_state *state, \ |
259 | struct cpuidle_state_usage *state_usage, char *buf) \ | 262 | struct cpuidle_state_usage *state_usage, \ |
263 | char *buf) \ | ||
260 | { \ | 264 | { \ |
261 | return sprintf(buf, "%llu\n", state_usage->_name);\ | 265 | return sprintf(buf, "%llu\n", state_usage->_name);\ |
262 | } | 266 | } |
263 | 267 | ||
264 | #define define_show_state_str_function(_name) \ | 268 | #define define_show_state_str_function(_name) \ |
265 | static ssize_t show_state_##_name(struct cpuidle_state *state, \ | 269 | static ssize_t show_state_##_name(struct cpuidle_state *state, \ |
266 | struct cpuidle_state_usage *state_usage, char *buf) \ | 270 | struct cpuidle_state_usage *state_usage, \ |
271 | char *buf) \ | ||
267 | { \ | 272 | { \ |
268 | if (state->_name[0] == '\0')\ | 273 | if (state->_name[0] == '\0')\ |
269 | return sprintf(buf, "<null>\n");\ | 274 | return sprintf(buf, "<null>\n");\ |
@@ -309,8 +314,9 @@ struct cpuidle_state_kobj { | |||
309 | #define kobj_to_state(k) (kobj_to_state_obj(k)->state) | 314 | #define kobj_to_state(k) (kobj_to_state_obj(k)->state) |
310 | #define kobj_to_state_usage(k) (kobj_to_state_obj(k)->state_usage) | 315 | #define kobj_to_state_usage(k) (kobj_to_state_obj(k)->state_usage) |
311 | #define attr_to_stateattr(a) container_of(a, struct cpuidle_state_attr, attr) | 316 | #define attr_to_stateattr(a) container_of(a, struct cpuidle_state_attr, attr) |
312 | static ssize_t cpuidle_state_show(struct kobject * kobj, | 317 | |
313 | struct attribute * attr ,char * buf) | 318 | static ssize_t cpuidle_state_show(struct kobject *kobj, struct attribute *attr, |
319 | char * buf) | ||
314 | { | 320 | { |
315 | int ret = -EIO; | 321 | int ret = -EIO; |
316 | struct cpuidle_state *state = kobj_to_state(kobj); | 322 | struct cpuidle_state *state = kobj_to_state(kobj); |
@@ -323,8 +329,8 @@ static ssize_t cpuidle_state_show(struct kobject * kobj, | |||
323 | return ret; | 329 | return ret; |
324 | } | 330 | } |
325 | 331 | ||
326 | static ssize_t cpuidle_state_store(struct kobject *kobj, | 332 | static ssize_t cpuidle_state_store(struct kobject *kobj, struct attribute *attr, |
327 | struct attribute *attr, const char *buf, size_t size) | 333 | const char *buf, size_t size) |
328 | { | 334 | { |
329 | int ret = -EIO; | 335 | int ret = -EIO; |
330 | struct cpuidle_state *state = kobj_to_state(kobj); | 336 | struct cpuidle_state *state = kobj_to_state(kobj); |
@@ -449,8 +455,8 @@ static void cpuidle_driver_sysfs_release(struct kobject *kobj) | |||
449 | complete(&driver_kobj->kobj_unregister); | 455 | complete(&driver_kobj->kobj_unregister); |
450 | } | 456 | } |
451 | 457 | ||
452 | static ssize_t cpuidle_driver_show(struct kobject *kobj, struct attribute * attr, | 458 | static ssize_t cpuidle_driver_show(struct kobject *kobj, struct attribute *attr, |
453 | char * buf) | 459 | char *buf) |
454 | { | 460 | { |
455 | int ret = -EIO; | 461 | int ret = -EIO; |
456 | struct cpuidle_driver_kobj *driver_kobj = kobj_to_driver_kobj(kobj); | 462 | struct cpuidle_driver_kobj *driver_kobj = kobj_to_driver_kobj(kobj); |