Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f89ae89e authored by Daniel Lezcano's avatar Daniel Lezcano Committed by Rafael J. Wysocki
Browse files

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: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 10b9d3f8
Loading
Loading
Loading
Loading
+22 −16
Original line number Diff line number Diff line
@@ -33,7 +33,8 @@ static ssize_t show_available_governors(struct device *dev,

	mutex_lock(&cpuidle_lock);
	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;
		i += scnprintf(&buf[i], CPUIDLE_NAME_LEN, "%s ", tmp->name);
	}
@@ -168,7 +169,9 @@ struct cpuidle_attr {

#define kobj_to_cpuidledev(k) container_of(k, struct cpuidle_device, kobj)
#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;
	struct cpuidle_device *dev = kobj_to_cpuidledev(kobj);
@@ -256,14 +259,16 @@ static ssize_t store_state_##_name(struct cpuidle_state *state, \

#define define_show_state_ull_function(_name) \
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);\
}

#define define_show_state_str_function(_name) \
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')\
		return sprintf(buf, "<null>\n");\
@@ -309,8 +314,9 @@ struct cpuidle_state_kobj {
#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 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;
	struct cpuidle_state *state = kobj_to_state(kobj);
@@ -323,8 +329,8 @@ static ssize_t cpuidle_state_show(struct kobject * kobj,
	return ret;
}

static ssize_t cpuidle_state_store(struct kobject *kobj,
	struct attribute *attr, const char *buf, size_t size)
static ssize_t cpuidle_state_store(struct kobject *kobj, struct attribute *attr,
				   const char *buf, size_t size)
{
	int ret = -EIO;
	struct cpuidle_state *state = kobj_to_state(kobj);