* [PATCH 1/4] regulator: dbx500-prcmu: Silence checkpatch warnings
@ 2014-03-18 10:23 Sachin Kamat
2014-03-18 10:23 ` [PATCH 2/4] regulator: max8660: " Sachin Kamat
` (3 more replies)
0 siblings, 4 replies; 9+ messages in thread
From: Sachin Kamat @ 2014-03-18 10:23 UTC (permalink / raw)
To: linux-kernel; +Cc: broonie, lgirdwood, sachin.kamat
Silences the following warning type:
WARNING: Missing a blank line after declarations
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
drivers/regulator/dbx500-prcmu.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/regulator/dbx500-prcmu.c b/drivers/regulator/dbx500-prcmu.c
index f111dfb8d2d7..538478883ae2 100644
--- a/drivers/regulator/dbx500-prcmu.c
+++ b/drivers/regulator/dbx500-prcmu.c
@@ -78,6 +78,7 @@ static struct ux500_regulator_debug {
void ux500_regulator_suspend_debug(void)
{
int i;
+
for (i = 0; i < rdebug.num_regulators; i++)
rdebug.state_before_suspend[i] =
rdebug.regulator_array[i].is_enabled;
@@ -86,6 +87,7 @@ void ux500_regulator_suspend_debug(void)
void ux500_regulator_resume_debug(void)
{
int i;
+
for (i = 0; i < rdebug.num_regulators; i++)
rdebug.state_after_suspend[i] =
rdebug.regulator_array[i].is_enabled;
--
1.7.9.5
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 2/4] regulator: max8660: Silence checkpatch warnings
2014-03-18 10:23 [PATCH 1/4] regulator: dbx500-prcmu: Silence checkpatch warnings Sachin Kamat
@ 2014-03-18 10:23 ` Sachin Kamat
2014-03-18 12:39 ` Mark Brown
2014-03-18 10:23 ` [PATCH 3/4] regulator: max8925: Silence checkpatch warning Sachin Kamat
` (2 subsequent siblings)
3 siblings, 1 reply; 9+ messages in thread
From: Sachin Kamat @ 2014-03-18 10:23 UTC (permalink / raw)
To: linux-kernel; +Cc: broonie, lgirdwood, sachin.kamat
Silences the following type of error/warnings:
ERROR: that open brace { should be on the previous line
WARNING: Missing a blank line after declarations
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
drivers/regulator/max8660.c | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/drivers/regulator/max8660.c b/drivers/regulator/max8660.c
index bbbe53b1b5bf..aabfb3b2407c 100644
--- a/drivers/regulator/max8660.c
+++ b/drivers/regulator/max8660.c
@@ -85,11 +85,12 @@ struct max8660 {
static int max8660_write(struct max8660 *max8660, u8 reg, u8 mask, u8 val)
{
- static const u8 max8660_addresses[MAX8660_N_REGS] =
- { 0x10, 0x12, 0x20, 0x23, 0x24, 0x29, 0x2a, 0x32, 0x33, 0x39, 0x80 };
+ static const u8 max8660_addresses[MAX8660_N_REGS] = {
+ 0x10, 0x12, 0x20, 0x23, 0x24, 0x29, 0x2a, 0x32, 0x33, 0x39, 0x80 };
int ret;
u8 reg_val = (max8660->shadow_regs[reg] & mask) | val;
+
dev_vdbg(&max8660->client->dev, "Writing reg %02x with %02x\n",
max8660_addresses[reg], reg_val);
@@ -111,6 +112,7 @@ static int max8660_dcdc_is_enabled(struct regulator_dev *rdev)
struct max8660 *max8660 = rdev_get_drvdata(rdev);
u8 val = max8660->shadow_regs[MAX8660_OVER1];
u8 mask = (rdev_get_id(rdev) == MAX8660_V3) ? 1 : 4;
+
return !!(val & mask);
}
@@ -118,6 +120,7 @@ static int max8660_dcdc_enable(struct regulator_dev *rdev)
{
struct max8660 *max8660 = rdev_get_drvdata(rdev);
u8 bit = (rdev_get_id(rdev) == MAX8660_V3) ? 1 : 4;
+
return max8660_write(max8660, MAX8660_OVER1, 0xff, bit);
}
@@ -125,15 +128,16 @@ static int max8660_dcdc_disable(struct regulator_dev *rdev)
{
struct max8660 *max8660 = rdev_get_drvdata(rdev);
u8 mask = (rdev_get_id(rdev) == MAX8660_V3) ? ~1 : ~4;
+
return max8660_write(max8660, MAX8660_OVER1, mask, 0);
}
static int max8660_dcdc_get_voltage_sel(struct regulator_dev *rdev)
{
struct max8660 *max8660 = rdev_get_drvdata(rdev);
-
u8 reg = (rdev_get_id(rdev) == MAX8660_V3) ? MAX8660_ADTV2 : MAX8660_SDTV2;
u8 selector = max8660->shadow_regs[reg];
+
return selector;
}
@@ -206,6 +210,7 @@ static int max8660_ldo67_is_enabled(struct regulator_dev *rdev)
struct max8660 *max8660 = rdev_get_drvdata(rdev);
u8 val = max8660->shadow_regs[MAX8660_OVER2];
u8 mask = (rdev_get_id(rdev) == MAX8660_V6) ? 2 : 4;
+
return !!(val & mask);
}
@@ -213,6 +218,7 @@ static int max8660_ldo67_enable(struct regulator_dev *rdev)
{
struct max8660 *max8660 = rdev_get_drvdata(rdev);
u8 bit = (rdev_get_id(rdev) == MAX8660_V6) ? 2 : 4;
+
return max8660_write(max8660, MAX8660_OVER2, 0xff, bit);
}
@@ -220,15 +226,16 @@ static int max8660_ldo67_disable(struct regulator_dev *rdev)
{
struct max8660 *max8660 = rdev_get_drvdata(rdev);
u8 mask = (rdev_get_id(rdev) == MAX8660_V6) ? ~2 : ~4;
+
return max8660_write(max8660, MAX8660_OVER2, mask, 0);
}
static int max8660_ldo67_get_voltage_sel(struct regulator_dev *rdev)
{
struct max8660 *max8660 = rdev_get_drvdata(rdev);
-
u8 shift = (rdev_get_id(rdev) == MAX8660_V6) ? 0 : 4;
u8 selector = (max8660->shadow_regs[MAX8660_L12VCR] >> shift) & 0xf;
+
return selector;
}
--
1.7.9.5
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 3/4] regulator: max8925: Silence checkpatch warning
2014-03-18 10:23 [PATCH 1/4] regulator: dbx500-prcmu: Silence checkpatch warnings Sachin Kamat
2014-03-18 10:23 ` [PATCH 2/4] regulator: max8660: " Sachin Kamat
@ 2014-03-18 10:23 ` Sachin Kamat
2014-03-18 12:40 ` Mark Brown
2014-03-18 10:23 ` [PATCH 4/4] regulator: max8952: " Sachin Kamat
2014-03-18 12:38 ` [PATCH 1/4] regulator: dbx500-prcmu: Silence checkpatch warnings Mark Brown
3 siblings, 1 reply; 9+ messages in thread
From: Sachin Kamat @ 2014-03-18 10:23 UTC (permalink / raw)
To: linux-kernel; +Cc: broonie, lgirdwood, sachin.kamat
Silences the following type of checkpatch warning:
WARNING: Missing a blank line after declarations
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
drivers/regulator/max8925-regulator.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/regulator/max8925-regulator.c b/drivers/regulator/max8925-regulator.c
index e316abae004a..dad2bcd14e96 100644
--- a/drivers/regulator/max8925-regulator.c
+++ b/drivers/regulator/max8925-regulator.c
@@ -249,6 +249,7 @@ static int max8925_regulator_dt_init(struct platform_device *pdev,
{
struct device_node *nproot, *np;
int rcount;
+
nproot = of_node_get(pdev->dev.parent->of_node);
if (!nproot)
return -ENODEV;
--
1.7.9.5
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 4/4] regulator: max8952: Silence checkpatch warning
2014-03-18 10:23 [PATCH 1/4] regulator: dbx500-prcmu: Silence checkpatch warnings Sachin Kamat
2014-03-18 10:23 ` [PATCH 2/4] regulator: max8660: " Sachin Kamat
2014-03-18 10:23 ` [PATCH 3/4] regulator: max8925: Silence checkpatch warning Sachin Kamat
@ 2014-03-18 10:23 ` Sachin Kamat
2014-03-18 12:43 ` Mark Brown
2014-03-18 12:38 ` [PATCH 1/4] regulator: dbx500-prcmu: Silence checkpatch warnings Mark Brown
3 siblings, 1 reply; 9+ messages in thread
From: Sachin Kamat @ 2014-03-18 10:23 UTC (permalink / raw)
To: linux-kernel; +Cc: broonie, lgirdwood, sachin.kamat
Silences the following type of checkpatch warning:
WARNING: Missing a blank line after declarations
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
drivers/regulator/max8952.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/regulator/max8952.c b/drivers/regulator/max8952.c
index c5ee3cc048ee..d920f5a32ec8 100644
--- a/drivers/regulator/max8952.c
+++ b/drivers/regulator/max8952.c
@@ -57,6 +57,7 @@ struct max8952_data {
static int max8952_read_reg(struct max8952_data *max8952, u8 reg)
{
int ret = i2c_smbus_read_byte_data(max8952->client, reg);
+
if (ret > 0)
ret &= 0xff;
--
1.7.9.5
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/4] regulator: dbx500-prcmu: Silence checkpatch warnings
2014-03-18 10:23 [PATCH 1/4] regulator: dbx500-prcmu: Silence checkpatch warnings Sachin Kamat
` (2 preceding siblings ...)
2014-03-18 10:23 ` [PATCH 4/4] regulator: max8952: " Sachin Kamat
@ 2014-03-18 12:38 ` Mark Brown
3 siblings, 0 replies; 9+ messages in thread
From: Mark Brown @ 2014-03-18 12:38 UTC (permalink / raw)
To: Sachin Kamat; +Cc: linux-kernel, lgirdwood
[-- Attachment #1: Type: text/plain, Size: 170 bytes --]
On Tue, Mar 18, 2014 at 03:53:01PM +0530, Sachin Kamat wrote:
> Silences the following warning type:
> WARNING: Missing a blank line after declarations
applied, thanks.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 2/4] regulator: max8660: Silence checkpatch warnings
2014-03-18 10:23 ` [PATCH 2/4] regulator: max8660: " Sachin Kamat
@ 2014-03-18 12:39 ` Mark Brown
2014-03-19 8:14 ` Sachin Kamat
0 siblings, 1 reply; 9+ messages in thread
From: Mark Brown @ 2014-03-18 12:39 UTC (permalink / raw)
To: Sachin Kamat; +Cc: linux-kernel, lgirdwood
[-- Attachment #1: Type: text/plain, Size: 575 bytes --]
On Tue, Mar 18, 2014 at 03:53:02PM +0530, Sachin Kamat wrote:
> Silences the following type of error/warnings:
> ERROR: that open brace { should be on the previous line
> WARNING: Missing a blank line after declarations
Applied, but...
> - static const u8 max8660_addresses[MAX8660_N_REGS] =
> - { 0x10, 0x12, 0x20, 0x23, 0x24, 0x29, 0x2a, 0x32, 0x33, 0x39, 0x80 };
> + static const u8 max8660_addresses[MAX8660_N_REGS] = {
> + 0x10, 0x12, 0x20, 0x23, 0x24, 0x29, 0x2a, 0x32, 0x33, 0x39, 0x80 };
Think about what you're doing here - you want the }; on a new line too.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 3/4] regulator: max8925: Silence checkpatch warning
2014-03-18 10:23 ` [PATCH 3/4] regulator: max8925: Silence checkpatch warning Sachin Kamat
@ 2014-03-18 12:40 ` Mark Brown
0 siblings, 0 replies; 9+ messages in thread
From: Mark Brown @ 2014-03-18 12:40 UTC (permalink / raw)
To: Sachin Kamat; +Cc: linux-kernel, lgirdwood
[-- Attachment #1: Type: text/plain, Size: 184 bytes --]
On Tue, Mar 18, 2014 at 03:53:03PM +0530, Sachin Kamat wrote:
> Silences the following type of checkpatch warning:
> WARNING: Missing a blank line after declarations
Applied, thanks.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 4/4] regulator: max8952: Silence checkpatch warning
2014-03-18 10:23 ` [PATCH 4/4] regulator: max8952: " Sachin Kamat
@ 2014-03-18 12:43 ` Mark Brown
0 siblings, 0 replies; 9+ messages in thread
From: Mark Brown @ 2014-03-18 12:43 UTC (permalink / raw)
To: Sachin Kamat; +Cc: linux-kernel, lgirdwood
[-- Attachment #1: Type: text/plain, Size: 184 bytes --]
On Tue, Mar 18, 2014 at 03:53:04PM +0530, Sachin Kamat wrote:
> Silences the following type of checkpatch warning:
> WARNING: Missing a blank line after declarations
Applied, thanks.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 2/4] regulator: max8660: Silence checkpatch warnings
2014-03-18 12:39 ` Mark Brown
@ 2014-03-19 8:14 ` Sachin Kamat
0 siblings, 0 replies; 9+ messages in thread
From: Sachin Kamat @ 2014-03-19 8:14 UTC (permalink / raw)
To: Mark Brown; +Cc: LKML, Liam Girdwood
On 18 March 2014 18:09, Mark Brown <broonie@kernel.org> wrote:
> On Tue, Mar 18, 2014 at 03:53:02PM +0530, Sachin Kamat wrote:
>> Silences the following type of error/warnings:
>> ERROR: that open brace { should be on the previous line
>> WARNING: Missing a blank line after declarations
>
> Applied, but...
>
>> - static const u8 max8660_addresses[MAX8660_N_REGS] =
>> - { 0x10, 0x12, 0x20, 0x23, 0x24, 0x29, 0x2a, 0x32, 0x33, 0x39, 0x80 };
>> + static const u8 max8660_addresses[MAX8660_N_REGS] = {
>> + 0x10, 0x12, 0x20, 0x23, 0x24, 0x29, 0x2a, 0x32, 0x33, 0x39, 0x80 };
>
> Think about what you're doing here - you want the }; on a new line too.
Sorry about it. I was kind of in two minds about shifting it. I will
send a followup
for completeness.
--
With warm regards,
Sachin
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2014-03-19 8:14 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-18 10:23 [PATCH 1/4] regulator: dbx500-prcmu: Silence checkpatch warnings Sachin Kamat
2014-03-18 10:23 ` [PATCH 2/4] regulator: max8660: " Sachin Kamat
2014-03-18 12:39 ` Mark Brown
2014-03-19 8:14 ` Sachin Kamat
2014-03-18 10:23 ` [PATCH 3/4] regulator: max8925: Silence checkpatch warning Sachin Kamat
2014-03-18 12:40 ` Mark Brown
2014-03-18 10:23 ` [PATCH 4/4] regulator: max8952: " Sachin Kamat
2014-03-18 12:43 ` Mark Brown
2014-03-18 12:38 ` [PATCH 1/4] regulator: dbx500-prcmu: Silence checkpatch warnings Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®