linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] regulator: max77686: Fix checkpatch warnings
@ 2012-06-04  2:19 Axel Lin
  2012-06-04 10:29 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Axel Lin @ 2012-06-04  2:19 UTC (permalink / raw)
  To: linux-kernel
  Cc: Chiwoong Byun, Jonghwa Lee, Myungjoo Ham, Kyungmin Park,
	Yadwinder Singh Brar, Mark Brown, Liam Girdwood

Fix below checkpatch warnings:

$ scripts/checkpatch.pl -f drivers/regulator/max77686.c
ERROR: return is not a function, parentheses are not required
+       return (DIV_ROUND_UP(rdev->desc->uV_step

WARNING: line over 80 characters
+       .ops            = &max77686_buck_dvs_ops,                               \

total: 1 errors, 1 warnings, 339 lines checked

Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
v2: Also remove unnecessary parentheses in max77686_set_voltage_time_sel.

 drivers/regulator/max77686.c |   13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/drivers/regulator/max77686.c b/drivers/regulator/max77686.c
index 4e9f4f3..b76a038 100644
--- a/drivers/regulator/max77686.c
+++ b/drivers/regulator/max77686.c
@@ -75,17 +75,18 @@ static int max77686_set_dvs_voltage_time_sel(struct regulator_dev *rdev,
 {
 	struct max77686_data *max77686 = rdev_get_drvdata(rdev);
 	int ramp_rate[] = {13, 27, 55, 100};
-	return (DIV_ROUND_UP(rdev->desc->uV_step
-			* abs(new_selector - old_selector),
-			ramp_rate[max77686->ramp_delay]));
+
+	return DIV_ROUND_UP(rdev->desc->uV_step *
+			    abs(new_selector - old_selector),
+			    ramp_rate[max77686->ramp_delay]);
 }
 
 static int max77686_set_voltage_time_sel(struct regulator_dev *rdev,
 			unsigned int old_selector, unsigned int new_selector)
 {
 	/* Unconditionally 100 mV/us */
-	return (DIV_ROUND_UP(rdev->desc->uV_step
-		 * abs(new_selector - old_selector), 100));
+	return DIV_ROUND_UP(rdev->desc->uV_step *
+			    abs(new_selector - old_selector), 100);
 }
 
 static struct regulator_ops max77686_ops = {
@@ -171,7 +172,7 @@ static struct regulator_ops max77686_buck_dvs_ops = {
 #define regulator_desc_buck_dvs(num)		{			\
 	.name		= "BUCK"#num,					\
 	.id		= MAX77686_BUCK##num,				\
-	.ops		= &max77686_buck_dvs_ops,				\
+	.ops		= &max77686_buck_dvs_ops,			\
 	.type		= REGULATOR_VOLTAGE,				\
 	.owner		= THIS_MODULE,					\
 	.min_uV		= MAX77686_DVS_MINUV,				\
-- 
1.7.9.5




^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] regulator: max77686: Fix checkpatch warnings
  2012-06-04  2:19 [PATCH v2] regulator: max77686: Fix checkpatch warnings Axel Lin
@ 2012-06-04 10:29 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2012-06-04 10:29 UTC (permalink / raw)
  To: Axel Lin
  Cc: linux-kernel, Chiwoong Byun, Jonghwa Lee, Myungjoo Ham,
	Kyungmin Park, Yadwinder Singh Brar, Liam Girdwood

[-- Attachment #1: Type: text/plain, Size: 109 bytes --]

On Mon, Jun 04, 2012 at 10:19:18AM +0800, Axel Lin wrote:
> Fix below checkpatch warnings:

Applied, thanks.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-06-04 10:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-04  2:19 [PATCH v2] regulator: max77686: Fix checkpatch warnings Axel Lin
2012-06-04 10:29 ` Mark Brown

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).