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

Commit 29464f28 authored by Dave Jones's avatar Dave Jones
Browse files

[CPUFREQ] checkpatch cleanups for cpufreq core



Signed-off-by: default avatarDave Jones <davej@redhat.com>
parent 6072ace4
Loading
Loading
Loading
Loading
+26 −26
Original line number Diff line number Diff line
@@ -104,7 +104,8 @@ EXPORT_SYMBOL_GPL(unlock_policy_rwsem_write);


/* internal prototypes */
static int __cpufreq_governor(struct cpufreq_policy *policy, unsigned int event);
static int __cpufreq_governor(struct cpufreq_policy *policy,
		unsigned int event);
static unsigned int __cpufreq_get(unsigned int cpu);
static void handle_update(struct work_struct *work);

@@ -434,10 +435,6 @@ static int cpufreq_parse_governor(char *str_governor, unsigned int *policy,
}


/* drivers/base/cpu.c */
extern struct sysdev_class cpu_sysdev_class;


/**
 * cpufreq_per_cpu_attr_read() / show_##file_name() -
 * print out cpufreq information
@@ -512,7 +509,8 @@ static ssize_t show_scaling_governor(struct cpufreq_policy *policy, char *buf)
	else if (policy->policy == CPUFREQ_POLICY_PERFORMANCE)
		return sprintf(buf, "performance\n");
	else if (policy->governor)
		return scnprintf(buf, CPUFREQ_NAME_LEN, "%s\n", policy->governor->name);
		return scnprintf(buf, CPUFREQ_NAME_LEN, "%s\n",
				policy->governor->name);
	return -EINVAL;
}

@@ -575,7 +573,8 @@ static ssize_t show_scaling_available_governors(struct cpufreq_policy *policy,
	}

	list_for_each_entry(t, &cpufreq_governor_list, governor_list) {
		if (i >= (ssize_t) ((PAGE_SIZE / sizeof(char)) - (CPUFREQ_NAME_LEN + 2)))
		if (i >= (ssize_t) ((PAGE_SIZE / sizeof(char))
		    - (CPUFREQ_NAME_LEN + 2)))
			goto out;
		i += scnprintf(&buf[i], CPUFREQ_NAME_LEN, "%s ", t->name);
	}
@@ -858,10 +857,10 @@ static int cpufreq_add_dev(struct sys_device *sys_dev)
		if (cpu == j)
			continue;

		/* check for existing affected CPUs.  They may not be aware
		 * of it due to CPU Hotplug.
		/* Check for existing affected CPUs.
		 * They may not be aware of it due to CPU Hotplug.
		 */
		managed_policy = cpufreq_cpu_get(j);		// FIXME: Where is this released?  What about error paths?
		managed_policy = cpufreq_cpu_get(j);		/* FIXME: Where is this released?  What about error paths? */
		if (unlikely(managed_policy)) {

			/* Set proper policy_cpu */
@@ -1142,8 +1141,8 @@ static void handle_update(struct work_struct *work)
 *	@old_freq: CPU frequency the kernel thinks the CPU runs at
 *	@new_freq: CPU frequency the CPU actually runs at
 *
 *	We adjust to current frequency first, and need to clean up later. So either call
 *	to cpufreq_update_policy() or schedule handle_update()).
 *	We adjust to current frequency first, and need to clean up later.
 *	So either call to cpufreq_update_policy() or schedule handle_update()).
 */
static void cpufreq_out_of_sync(unsigned int cpu, unsigned int old_freq,
				unsigned int new_freq)
@@ -1625,7 +1624,8 @@ EXPORT_SYMBOL_GPL(cpufreq_unregister_governor);

/**
 * cpufreq_get_policy - get the current cpufreq_policy
 * @policy: struct cpufreq_policy into which the current cpufreq_policy is written
 * @policy: struct cpufreq_policy into which the current cpufreq_policy
 *	is written
 *
 * Reads the current cpufreq policy.
 */