2014-02-26 01:19:37

by Jingoo Han

[permalink] [raw]
Subject: [PATCH 1/3] regulator: tps80031: remove unnecessary parentheses

Remove unnecessary parentheses in order to fix the following
checkpatch error.

ERROR: return is not a function, parentheses are not required

Signed-off-by: Jingoo Han <[email protected]>
---
drivers/regulator/tps80031-regulator.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/regulator/tps80031-regulator.c b/drivers/regulator/tps80031-regulator.c
index ac88c98..26aa6d9 100644
--- a/drivers/regulator/tps80031-regulator.c
+++ b/drivers/regulator/tps80031-regulator.c
@@ -115,7 +115,7 @@ static int tps80031_reg_is_enabled(struct regulator_dev *rdev)
ri->rinfo->state_reg, ret);
return ret;
}
- return ((reg_val & TPS80031_STATE_MASK) == TPS80031_STATE_ON);
+ return (reg_val & TPS80031_STATE_MASK) == TPS80031_STATE_ON;
}

static int tps80031_reg_enable(struct regulator_dev *rdev)
--
1.7.10.4


2014-02-26 01:21:28

by Jingoo Han

[permalink] [raw]
Subject: [PATCH 2/3] regulator: dbx500: use seq_puts() instead of seq_printf()

For a constant format without additional arguments, use seq_puts()
instead of seq_printf(). Also, it fixes the following checkpatch
warning.

WARNING: Prefer seq_puts to seq_printf

Signed-off-by: Jingoo Han <[email protected]>
---
drivers/regulator/dbx500-prcmu.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/regulator/dbx500-prcmu.c b/drivers/regulator/dbx500-prcmu.c
index f111dfb..3dd1096 100644
--- a/drivers/regulator/dbx500-prcmu.c
+++ b/drivers/regulator/dbx500-prcmu.c
@@ -97,10 +97,10 @@ static int ux500_regulator_power_state_cnt_print(struct seq_file *s, void *p)
int err;

/* print power state count */
- err = seq_printf(s, "ux500-regulator power state count: %i\n",
- power_state_active_get());
+ err = seq_puts(s, "ux500-regulator power state count: %i\n",
+ power_state_active_get());
if (err < 0)
- dev_err(dev, "seq_printf overflow\n");
+ dev_err(dev, "seq_puts overflow\n");

return 0;
}
@@ -127,9 +127,9 @@ static int ux500_regulator_status_print(struct seq_file *s, void *p)
int i;

/* print dump header */
- err = seq_printf(s, "ux500-regulator status:\n");
+ err = seq_puts(s, "ux500-regulator status:\n");
if (err < 0)
- dev_err(dev, "seq_printf overflow\n");
+ dev_err(dev, "seq_puts overflow\n");

err = seq_printf(s, "%31s : %8s : %8s\n", "current",
"before", "after");
--
1.7.10.4

2014-02-26 01:22:09

by Jingoo Han

[permalink] [raw]
Subject: [PATCH 3/3] regulator: 88pm8607: fix indent code style

Fix indent code style in order to fix the following checkpatch
issues.

ERROR: code indent should use tabs where possible
WARNING: please, no space before tabs
WARNING: please, no spaces at the start of a line

Signed-off-by: Jingoo Han <[email protected]>
---
drivers/regulator/88pm8607.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/regulator/88pm8607.c b/drivers/regulator/88pm8607.c
index fa99bfc..337634a 100644
--- a/drivers/regulator/88pm8607.c
+++ b/drivers/regulator/88pm8607.c
@@ -2,7 +2,7 @@
* Regulators driver for Marvell 88PM8607
*
* Copyright (C) 2009 Marvell International Ltd.
- * Haojian Zhuang <[email protected]>
+ * Haojian Zhuang <[email protected]>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
@@ -78,7 +78,7 @@ static const unsigned int BUCK2_suspend_table[] = {
};

static const unsigned int BUCK3_table[] = {
- 0, 25000, 50000, 75000, 100000, 125000, 150000, 175000,
+ 0, 25000, 50000, 75000, 100000, 125000, 150000, 175000,
200000, 225000, 250000, 275000, 300000, 325000, 350000, 375000,
400000, 425000, 450000, 475000, 500000, 525000, 550000, 575000,
600000, 625000, 650000, 675000, 700000, 725000, 750000, 775000,
@@ -89,7 +89,7 @@ static const unsigned int BUCK3_table[] = {
};

static const unsigned int BUCK3_suspend_table[] = {
- 0, 25000, 50000, 75000, 100000, 125000, 150000, 175000,
+ 0, 25000, 50000, 75000, 100000, 125000, 150000, 175000,
200000, 225000, 250000, 275000, 300000, 325000, 350000, 375000,
400000, 425000, 450000, 475000, 500000, 525000, 550000, 575000,
600000, 625000, 650000, 675000, 700000, 725000, 750000, 775000,
--
1.7.10.4

2014-02-26 02:10:06

by Haojian Zhuang

[permalink] [raw]
Subject: Re: [PATCH 3/3] regulator: 88pm8607: fix indent code style

On Wed, Feb 26, 2014 at 9:22 AM, Jingoo Han <[email protected]> wrote:
> Fix indent code style in order to fix the following checkpatch
> issues.
>
> ERROR: code indent should use tabs where possible
> WARNING: please, no space before tabs
> WARNING: please, no spaces at the start of a line
>
> Signed-off-by: Jingoo Han <[email protected]>
> ---
> drivers/regulator/88pm8607.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/regulator/88pm8607.c b/drivers/regulator/88pm8607.c
> index fa99bfc..337634a 100644
> --- a/drivers/regulator/88pm8607.c
> +++ b/drivers/regulator/88pm8607.c
> @@ -2,7 +2,7 @@
> * Regulators driver for Marvell 88PM8607
> *
> * Copyright (C) 2009 Marvell International Ltd.
> - * Haojian Zhuang <[email protected]>
> + * Haojian Zhuang <[email protected]>
> *
> * This program is free software; you can redistribute it and/or modify
> * it under the terms of the GNU General Public License version 2 as
> @@ -78,7 +78,7 @@ static const unsigned int BUCK2_suspend_table[] = {
> };
>
> static const unsigned int BUCK3_table[] = {
> - 0, 25000, 50000, 75000, 100000, 125000, 150000, 175000,
> + 0, 25000, 50000, 75000, 100000, 125000, 150000, 175000,
> 200000, 225000, 250000, 275000, 300000, 325000, 350000, 375000,
> 400000, 425000, 450000, 475000, 500000, 525000, 550000, 575000,
> 600000, 625000, 650000, 675000, 700000, 725000, 750000, 775000,
> @@ -89,7 +89,7 @@ static const unsigned int BUCK3_table[] = {
> };
>
> static const unsigned int BUCK3_suspend_table[] = {
> - 0, 25000, 50000, 75000, 100000, 125000, 150000, 175000,
> + 0, 25000, 50000, 75000, 100000, 125000, 150000, 175000,
> 200000, 225000, 250000, 275000, 300000, 325000, 350000, 375000,
> 400000, 425000, 450000, 475000, 500000, 525000, 550000, 575000,
> 600000, 625000, 650000, 675000, 700000, 725000, 750000, 775000,
> --
> 1.7.10.4
>
>

Acked-by: Haojian Zhuang <[email protected]>

Regards
Haojian

2014-02-27 07:46:48

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH 3/3] regulator: 88pm8607: fix indent code style

On Wed, Feb 26, 2014 at 10:22:05AM +0900, Jingoo Han wrote:
> Fix indent code style in order to fix the following checkpatch
> issues.

Applied, thanks.


Attachments:
(No filename) (153.00 B)
signature.asc (836.00 B)
Digital signature
Download all attachments