* [PATCH] coding style: Fix 1 error and 5 warnings
@ 2015-07-16 15:55 antoine
2015-07-17 5:34 ` Sudip Mukherjee
2015-07-17 5:44 ` Sudip Mukherjee
0 siblings, 2 replies; 3+ messages in thread
From: antoine @ 2015-07-16 15:55 UTC (permalink / raw)
To: linux-fbdev
This is a patch to the ddk750_power.c file that fixes up five "line over 80
characters" warnings and one "return is not a function, parentheses are not
required" error found by the checkpatch.pl script.
Signed-off-by: Antoine BLIN <antoine.blin@lip6.fr>
---
drivers/staging/sm750fb/ddk750_power.c | 19 ++++++++++++-------
1 file changed, 12 insertions(+), 7 deletions(-)
diff --git a/drivers/staging/sm750fb/ddk750_power.c b/drivers/staging/sm750fb/ddk750_power.c
index c8c51be..42961ea 100644
--- a/drivers/staging/sm750fb/ddk750_power.c
+++ b/drivers/staging/sm750fb/ddk750_power.c
@@ -8,7 +8,8 @@ void ddk750_setDPMS(DPMS_t state)
if (getChipType() = SM750LE) {
value = PEEK32(CRT_DISPLAY_CTRL);
- POKE32(CRT_DISPLAY_CTRL, FIELD_VALUE(value, CRT_DISPLAY_CTRL, DPMS, state));
+ POKE32(CRT_DISPLAY_CTRL, FIELD_VALUE(value, CRT_DISPLAY_CTRL,
+ DPMS, state));
} else {
value = PEEK32(SYSTEM_CTRL);
value = FIELD_VALUE(value, SYSTEM_CTRL, DPMS, state);
@@ -20,7 +21,7 @@ unsigned int getPowerMode(void)
{
if (getChipType() = SM750LE)
return 0;
- return (FIELD_GET(PEEK32(POWER_MODE_CTRL), POWER_MODE_CTRL, MODE));
+ return FIELD_GET(PEEK32(POWER_MODE_CTRL), POWER_MODE_CTRL, MODE);
}
@@ -39,15 +40,18 @@ void setPowerMode(unsigned int powerMode)
switch (powerMode) {
case POWER_MODE_CTRL_MODE_MODE0:
- control_value = FIELD_SET(control_value, POWER_MODE_CTRL, MODE, MODE0);
+ control_value = FIELD_SET(control_value, POWER_MODE_CTRL, MODE,
+ MODE0);
break;
case POWER_MODE_CTRL_MODE_MODE1:
- control_value = FIELD_SET(control_value, POWER_MODE_CTRL, MODE, MODE1);
+ control_value = FIELD_SET(control_value, POWER_MODE_CTRL, MODE,
+ MODE1);
break;
case POWER_MODE_CTRL_MODE_SLEEP:
- control_value = FIELD_SET(control_value, POWER_MODE_CTRL, MODE, SLEEP);
+ control_value = FIELD_SET(control_value, POWER_MODE_CTRL, MODE,
+ SLEEP);
break;
default:
@@ -138,8 +142,9 @@ void enableZVPort(unsigned int enable)
gate = FIELD_SET(gate, CURRENT_GATE, I2C, ON);
#endif
} else {
- /* Disable ZV Port Gate. There is no way to know whether the GPIO pins are being used
- or not. Therefore, do not disable the GPIO gate. */
+ /* Disable ZV Port Gate. There is no way to know whether the
+ GPIO pins are being used or not. Therefore, do not disable the
+ GPIO gate. */
gate = FIELD_SET(gate, CURRENT_GATE, ZVPORT, OFF);
}
--
2.4.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] coding style: Fix 1 error and 5 warnings
2015-07-16 15:55 [PATCH] coding style: Fix 1 error and 5 warnings antoine
@ 2015-07-17 5:34 ` Sudip Mukherjee
2015-07-17 5:44 ` Sudip Mukherjee
1 sibling, 0 replies; 3+ messages in thread
From: Sudip Mukherjee @ 2015-07-17 5:34 UTC (permalink / raw)
To: linux-fbdev
On Thu, Jul 16, 2015 at 05:55:54PM +0200, antoine wrote:
> This is a patch to the ddk750_power.c file that fixes up five "line over 80
> characters" warnings and one "return is not a function, parentheses are not
> required" error found by the checkpatch.pl script.
That becomes two different change. Please only do one type of change in
one patch.
>
> Signed-off-by: Antoine BLIN <antoine.blin@lip6.fr>
Your Signed-off-by name should match your email From: header. Please
make the required changed in your .gitconfig file.
> ---
> drivers/staging/sm750fb/ddk750_power.c | 19 ++++++++++++-------
> 1 file changed, 12 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/staging/sm750fb/ddk750_power.c b/drivers/staging/sm750fb/ddk750_power.c
> index c8c51be..42961ea 100644
> --- a/drivers/staging/sm750fb/ddk750_power.c
> +++ b/drivers/staging/sm750fb/ddk750_power.c
> @@ -8,7 +8,8 @@ void ddk750_setDPMS(DPMS_t state)
>
> if (getChipType() = SM750LE) {
> value = PEEK32(CRT_DISPLAY_CTRL);
> - POKE32(CRT_DISPLAY_CTRL, FIELD_VALUE(value, CRT_DISPLAY_CTRL, DPMS, state));
> + POKE32(CRT_DISPLAY_CTRL, FIELD_VALUE(value, CRT_DISPLAY_CTRL,
> + DPMS, state));
Check your patch with --strict option of checkpatch and it will say
"alignment not matching"
regards
sudip
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] coding style: Fix 1 error and 5 warnings
2015-07-16 15:55 [PATCH] coding style: Fix 1 error and 5 warnings antoine
2015-07-17 5:34 ` Sudip Mukherjee
@ 2015-07-17 5:44 ` Sudip Mukherjee
1 sibling, 0 replies; 3+ messages in thread
From: Sudip Mukherjee @ 2015-07-17 5:44 UTC (permalink / raw)
To: linux-fbdev
On Fri, Jul 17, 2015 at 10:52:59AM +0530, Sudip Mukherjee wrote:
> On Thu, Jul 16, 2015 at 05:55:54PM +0200, antoine wrote:
> > This is a patch to the ddk750_power.c file that fixes up five "line over 80
> > characters" warnings and one "return is not a function, parentheses are not
> > required" error found by the checkpatch.pl script.
> That becomes two different change. Please only do one type of change in
> one patch.
Forgot mentioning, please fix the subject also.
regards
sudip
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-07-17 5:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-16 15:55 [PATCH] coding style: Fix 1 error and 5 warnings antoine
2015-07-17 5:34 ` Sudip Mukherjee
2015-07-17 5:44 ` Sudip Mukherjee
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).