linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eduardo Valentin <eduardo.valentin@ti.com>
To: amit.kachhap@linaro.org
Cc: Eduardo Valentin <eduardo.valentin@ti.com>,
	Zhang Rui <rui.zhang@intel.com>,
	linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 06/30] thermal: cpu_cooling: standardize end of function
Date: Wed, 17 Apr 2013 13:11:59 -0400	[thread overview]
Message-ID: <1366218743-20841-7-git-send-email-eduardo.valentin@ti.com> (raw)
In-Reply-To: <1366218743-20841-1-git-send-email-eduardo.valentin@ti.com>

Just for code readiness, this patch makes all functions
on this file to have a blank line before their returns.
Now, some functions follow this pattern, and others will
not have a blank line. So, this patch makes it a single
pattern.

Cc: Zhang Rui <rui.zhang@intel.com>
Cc: linux-pm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
---
 drivers/thermal/cpu_cooling.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c
index bdc4233..68d5a2d 100644
--- a/drivers/thermal/cpu_cooling.c
+++ b/drivers/thermal/cpu_cooling.c
@@ -67,6 +67,11 @@ static struct cpufreq_cooling_device *notify_device;
  * get_idr - function to get a unique id.
  * @idr: struct idr * handle used to create a id.
  * @id: int * value generated by this function.
+ *
+ * This function will populate @id with an unique
+ * id, using the idr API.
+ *
+ * Return: 0 on success, an error code on failure.
  */
 static int get_idr(struct idr *idr, int *id)
 {
@@ -78,6 +83,7 @@ static int get_idr(struct idr *idr, int *id)
 	if (unlikely(ret < 0))
 		return ret;
 	*id = ret;
+
 	return 0;
 }
 
@@ -102,6 +108,7 @@ static void release_idr(struct idr *idr, int id)
 static int is_cpufreq_valid(int cpu)
 {
 	struct cpufreq_policy policy;
+
 	return !cpufreq_get_policy(&policy, cpu);
 }
 
@@ -189,6 +196,7 @@ static int get_property(unsigned int cpu, unsigned long input,
 		}
 		j++;
 	}
+
 	return -EINVAL;
 }
 
@@ -198,6 +206,7 @@ unsigned long cpufreq_cooling_get_level(unsigned int cpu, unsigned int freq)
 
 	if (get_property(cpu, (unsigned long)freq, &val, GET_LEVEL))
 		return THERMAL_CSTATE_INVALID;
+
 	return (unsigned long)val;
 }
 EXPORT_SYMBOL_GPL(cpufreq_cooling_get_level);
@@ -216,6 +225,7 @@ static unsigned int get_cpu_frequency(unsigned int cpu, unsigned long level)
 	ret = get_property(cpu, level, &freq, GET_FREQ);
 	if (ret)
 		return 0;
+
 	return freq;
 }
 
@@ -322,6 +332,7 @@ static int cpufreq_get_cur_state(struct thermal_cooling_device *cdev,
 	struct cpufreq_cooling_device *cpufreq_device = cdev->devdata;
 
 	*state = cpufreq_device->cpufreq_state;
+
 	return 0;
 }
 
@@ -411,6 +422,7 @@ struct thermal_cooling_device *cpufreq_cooling_register(
 	cpufreq_dev_count++;
 
 	mutex_unlock(&cooling_cpufreq_lock);
+
 	return cool_dev;
 }
 EXPORT_SYMBOL_GPL(cpufreq_cooling_register);
-- 
1.8.2.1.342.gfa7285d

  parent reply	other threads:[~2013-04-17 17:11 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1366218743-20841-1-git-send-email-eduardo.valentin@ti.com>
2013-04-17 17:11 ` [PATCH 01/30] thermal: cpu_cooling: remove unused headers Eduardo Valentin
2013-04-22  2:16   ` amit daniel kachhap
2013-04-24 14:44   ` Zhang, Rui
2013-04-24 16:31   ` Zhang, Rui
2013-04-24 16:38     ` Zhang, Rui
2013-04-17 17:11 ` [PATCH 02/30] thermal: cpu_cooling: remove trailing white spaces Eduardo Valentin
2013-04-24 14:48   ` Zhang, Rui
2013-04-24 15:13     ` Zhang, Rui
2013-04-24 17:44     ` Eduardo Valentin
2013-04-17 17:11 ` [PATCH 03/30] thermal: cpu_cooling: fix kernel_doc for cpufreq_cooling_device Eduardo Valentin
2013-04-22  2:18   ` amit kachhap
2013-04-24 14:49   ` Zhang, Rui
2013-04-17 17:11 ` [PATCH 04/30] thermal: cpu_cooling: use EXPORT_SYMBOL_GPL Eduardo Valentin
2013-04-24 14:50   ` Zhang, Rui
2013-04-17 17:11 ` [PATCH 05/30] thermal: cpu_cooling: remove compiler warning Eduardo Valentin
2013-04-17 17:11 ` Eduardo Valentin [this message]
2013-04-17 17:12 ` [PATCH 07/30] thermal: cpu_cooling: fix kernel doc for is_cpufreq_valid Eduardo Valentin
2013-04-17 17:12 ` [PATCH 08/30] thermal: cpu_cooling: add documentation for get_property Eduardo Valentin
2013-04-17 17:12 ` [PATCH 09/30] thermal: cpu_cooling: standardize comment style Eduardo Valentin
2013-04-17 17:12 ` [PATCH 10/30] thermal: cpu_cooling: align on open parenthesis Eduardo Valentin
2013-04-17 17:12 ` [PATCH 11/30] thermal: cpu_cooling: remove trailing blank line Eduardo Valentin
2013-04-17 17:12 ` [PATCH 12/30] thermal: cpu_cooling: document cpufreq_get_cooling_level Eduardo Valentin
2013-04-17 17:12 ` [PATCH 13/30] thermal: cpu_cooling: remove checkpatch.pl warning Eduardo Valentin
2013-04-17 17:12 ` [PATCH 14/30] thermal: cpu_cooling: improve documentation for get_cpu_frequency Eduardo Valentin
2013-04-17 17:12 ` [PATCH 15/30] thermal: cpu_cooling: update documentation for cpufreq_apply_cooling Eduardo Valentin
2013-04-17 17:12 ` [PATCH 16/30] thermal: cpu_cooling: update documentation for cpufreq_thermal_notifier Eduardo Valentin
2013-04-17 17:12 ` [PATCH 17/30] thermal: cpu_cooling: update Kconfig entry Eduardo Valentin
2013-04-17 17:12 ` [PATCH 18/30] thermal: cpu_cooling: alignment improvements Eduardo Valentin
2013-04-17 17:12 ` [PATCH 19/30] thermal: cpu_cooling: update documentation for cpufreq_get_max_state Eduardo Valentin
2013-04-17 17:12 ` [PATCH 20/30] thermal: cpu_cooling: update documentation for cpufreq_get_cur_state Eduardo Valentin
2013-04-17 17:12 ` [PATCH 21/30] thermal: cpu_cooling: update documentation for cpufreq_set_cur_state Eduardo Valentin
2013-04-17 17:12 ` [PATCH 22/30] thermal: cpu_cooling: update kernel-doc for cpufreq_cooling_register Eduardo Valentin
2013-04-17 17:12 ` [PATCH 23/30] thermal: cpu_cooling: update kernel-doc comment for cpufreq_cooling_unregister Eduardo Valentin
2013-04-17 17:12 ` [PATCH 24/30] thermal: cpu_cooling: use snprintf instead of sprintf Eduardo Valentin
2013-04-17 17:12 ` [PATCH 25/30] thermal: cpu_cooling: remove not needed curl brackets Eduardo Valentin
2013-04-17 17:12 ` [PATCH 26/30] thermal: cpu_cooling: remove unused symbols Eduardo Valentin
2013-04-24 14:52   ` Zhang, Rui
2013-04-24 17:33     ` Eduardo Valentin
2013-04-17 17:12 ` [PATCH 28/30] MAINTAINERS: update thermal entry by adding file cpu_cooling.h Eduardo Valentin
2013-04-24 17:34   ` Eduardo Valentin
2013-04-24 23:40     ` Zhang Rui
2013-04-17 17:12 ` [PATCH 29/30] thermal: cpu_cooling: remove unused symbols on cpu_cooling.h Eduardo Valentin
2013-04-17 17:12 ` [PATCH 30/30] thermal: cpu_cooling: improve line breaking Eduardo Valentin
2013-04-17 20:32 ` [PATCH 00/30] thermal: cpu_cooling: code improvements Eduardo Valentin
2013-04-22  2:34   ` amit daniel kachhap
2013-04-22 13:07     ` Eduardo Valentin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1366218743-20841-7-git-send-email-eduardo.valentin@ti.com \
    --to=eduardo.valentin@ti.com \
    --cc=amit.kachhap@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rui.zhang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).