提交 f89ae89e 编写于 作者: D Daniel Lezcano 提交者: Rafael J. Wysocki

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: NDaniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
上级 10b9d3f8
...@@ -33,7 +33,8 @@ static ssize_t show_available_governors(struct device *dev, ...@@ -33,7 +33,8 @@ static ssize_t show_available_governors(struct device *dev,
mutex_lock(&cpuidle_lock); mutex_lock(&cpuidle_lock);
list_for_each_entry(tmp, &cpuidle_governors, governor_list) { list_for_each_entry(tmp, &cpuidle_governors, governor_list) {
if (i >= (ssize_t) ((PAGE_SIZE/sizeof(char)) - CPUIDLE_NAME_LEN - 2)) if (i >= (ssize_t) ((PAGE_SIZE/sizeof(char)) -
CPUIDLE_NAME_LEN - 2))
goto out; goto out;
i += scnprintf(&buf[i], CPUIDLE_NAME_LEN, "%s ", tmp->name); i += scnprintf(&buf[i], CPUIDLE_NAME_LEN, "%s ", tmp->name);
} }
...@@ -168,11 +169,13 @@ struct cpuidle_attr { ...@@ -168,11 +169,13 @@ struct cpuidle_attr {
#define kobj_to_cpuidledev(k) container_of(k, struct cpuidle_device, kobj) #define kobj_to_cpuidledev(k) container_of(k, struct cpuidle_device, kobj)
#define attr_to_cpuidleattr(a) container_of(a, struct cpuidle_attr, attr) #define attr_to_cpuidleattr(a) container_of(a, struct cpuidle_attr, attr)
static ssize_t cpuidle_show(struct kobject * kobj, struct attribute * attr ,char * buf)
static ssize_t cpuidle_show(struct kobject *kobj, struct attribute *attr,
char *buf)
{ {
int ret = -EIO; int ret = -EIO;
struct cpuidle_device *dev = kobj_to_cpuidledev(kobj); struct cpuidle_device *dev = kobj_to_cpuidledev(kobj);
struct cpuidle_attr * cattr = attr_to_cpuidleattr(attr); struct cpuidle_attr *cattr = attr_to_cpuidleattr(attr);
if (cattr->show) { if (cattr->show) {
mutex_lock(&cpuidle_lock); mutex_lock(&cpuidle_lock);
...@@ -182,12 +185,12 @@ static ssize_t cpuidle_show(struct kobject * kobj, struct attribute * attr ,char ...@@ -182,12 +185,12 @@ static ssize_t cpuidle_show(struct kobject * kobj, struct attribute * attr ,char
return ret; return ret;
} }
static ssize_t cpuidle_store(struct kobject * kobj, struct attribute * attr, static ssize_t cpuidle_store(struct kobject *kobj, struct attribute *attr,
const char * buf, size_t count) const char *buf, size_t count)
{ {
int ret = -EIO; int ret = -EIO;
struct cpuidle_device *dev = kobj_to_cpuidledev(kobj); struct cpuidle_device *dev = kobj_to_cpuidledev(kobj);
struct cpuidle_attr * cattr = attr_to_cpuidleattr(attr); struct cpuidle_attr *cattr = attr_to_cpuidleattr(attr);
if (cattr->store) { if (cattr->store) {
mutex_lock(&cpuidle_lock); mutex_lock(&cpuidle_lock);
...@@ -237,8 +240,8 @@ static ssize_t show_state_##_name(struct cpuidle_state *state, \ ...@@ -237,8 +240,8 @@ static ssize_t show_state_##_name(struct cpuidle_state *state, \
#define define_store_state_ull_function(_name) \ #define define_store_state_ull_function(_name) \
static ssize_t store_state_##_name(struct cpuidle_state *state, \ static ssize_t store_state_##_name(struct cpuidle_state *state, \
struct cpuidle_state_usage *state_usage, \ struct cpuidle_state_usage *state_usage, \
const char *buf, size_t size) \ const char *buf, size_t size) \
{ \ { \
unsigned long long value; \ unsigned long long value; \
int err; \ int err; \
...@@ -256,14 +259,16 @@ static ssize_t store_state_##_name(struct cpuidle_state *state, \ ...@@ -256,14 +259,16 @@ static ssize_t store_state_##_name(struct cpuidle_state *state, \
#define define_show_state_ull_function(_name) \ #define define_show_state_ull_function(_name) \
static ssize_t show_state_##_name(struct cpuidle_state *state, \ static ssize_t show_state_##_name(struct cpuidle_state *state, \
struct cpuidle_state_usage *state_usage, char *buf) \ struct cpuidle_state_usage *state_usage, \
char *buf) \
{ \ { \
return sprintf(buf, "%llu\n", state_usage->_name);\ return sprintf(buf, "%llu\n", state_usage->_name);\
} }
#define define_show_state_str_function(_name) \ #define define_show_state_str_function(_name) \
static ssize_t show_state_##_name(struct cpuidle_state *state, \ static ssize_t show_state_##_name(struct cpuidle_state *state, \
struct cpuidle_state_usage *state_usage, char *buf) \ struct cpuidle_state_usage *state_usage, \
char *buf) \
{ \ { \
if (state->_name[0] == '\0')\ if (state->_name[0] == '\0')\
return sprintf(buf, "<null>\n");\ return sprintf(buf, "<null>\n");\
...@@ -309,8 +314,9 @@ struct cpuidle_state_kobj { ...@@ -309,8 +314,9 @@ struct cpuidle_state_kobj {
#define kobj_to_state(k) (kobj_to_state_obj(k)->state) #define kobj_to_state(k) (kobj_to_state_obj(k)->state)
#define kobj_to_state_usage(k) (kobj_to_state_obj(k)->state_usage) #define kobj_to_state_usage(k) (kobj_to_state_obj(k)->state_usage)
#define attr_to_stateattr(a) container_of(a, struct cpuidle_state_attr, attr) #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) static ssize_t cpuidle_state_show(struct kobject *kobj, struct attribute *attr,
char * buf)
{ {
int ret = -EIO; int ret = -EIO;
struct cpuidle_state *state = kobj_to_state(kobj); struct cpuidle_state *state = kobj_to_state(kobj);
...@@ -323,8 +329,8 @@ static ssize_t cpuidle_state_show(struct kobject * kobj, ...@@ -323,8 +329,8 @@ static ssize_t cpuidle_state_show(struct kobject * kobj,
return ret; return ret;
} }
static ssize_t cpuidle_state_store(struct kobject *kobj, static ssize_t cpuidle_state_store(struct kobject *kobj, struct attribute *attr,
struct attribute *attr, const char *buf, size_t size) const char *buf, size_t size)
{ {
int ret = -EIO; int ret = -EIO;
struct cpuidle_state *state = kobj_to_state(kobj); struct cpuidle_state *state = kobj_to_state(kobj);
...@@ -449,8 +455,8 @@ static void cpuidle_driver_sysfs_release(struct kobject *kobj) ...@@ -449,8 +455,8 @@ static void cpuidle_driver_sysfs_release(struct kobject *kobj)
complete(&driver_kobj->kobj_unregister); complete(&driver_kobj->kobj_unregister);
} }
static ssize_t cpuidle_driver_show(struct kobject *kobj, struct attribute * attr, static ssize_t cpuidle_driver_show(struct kobject *kobj, struct attribute *attr,
char * buf) char *buf)
{ {
int ret = -EIO; int ret = -EIO;
struct cpuidle_driver_kobj *driver_kobj = kobj_to_driver_kobj(kobj); struct cpuidle_driver_kobj *driver_kobj = kobj_to_driver_kobj(kobj);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册