Staging: sm750fb: fix switch-case
Subsystems (2)
PATCH 3/5 Staging: sm750fb: fix switch-case
Fixes checkpatch.pl error by properly indenting code using tabs.
ERROR: switch and case should be at the same indent
Signed-off-by Amitoj Kaur Chawla <[email protected]>
--- drivers/staging/sm750fb/ddk750_chip.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-)
drivers/staging/sm750fb/ddk750_chip.c +15 -15
@@ -154,21 +154,21 @@ void setMemoryClock(unsigned int frequency)/* Set the corresponding divisor in the register. */ ulReg =PEEK32 (CURRENT_GATE ); -switch (divisor) { -default : -case 1 : - ulReg =FIELD_SET (ulReg,CURRENT_GATE ,M2XCLK ,DIV_1 ); -break ; -case 2 : - ulReg =FIELD_SET (ulReg,CURRENT_GATE ,M2XCLK ,DIV_2 ); -break ; -case 3 : - ulReg =FIELD_SET (ulReg,CURRENT_GATE ,M2XCLK ,DIV_3 ); -break ; -case 4 : - ulReg =FIELD_SET (ulReg,CURRENT_GATE ,M2XCLK ,DIV_4 ); -break ; - } +switch (divisor) { +default : +case 1 : + ulReg =FIELD_SET (ulReg,CURRENT_GATE ,M2XCLK ,DIV_1 ); +break ; +case 2 : + ulReg =FIELD_SET (ulReg,CURRENT_GATE ,M2XCLK ,DIV_2 ); +break ; +case 3 : + ulReg =FIELD_SET (ulReg,CURRENT_GATE ,M2XCLK ,DIV_3 ); +break ; +case 4 : + ulReg =FIELD_SET (ulReg,CURRENT_GATE ,M2XCLK ,DIV_4 ); +break ; + }setCurrentGate (ulReg); }
Signature · 1 line
1.9.1
Quoted 2 lines · Amitoj Kaur Chawla
Fixes checkpatch.pl error by properly indenting code using tabs.
ERROR: switch and case should be at the same indent
There is an extra "Outreachy kernel" in the subject line.
The commit message could also be better as
"Remove indentation in switch code. Problem found using checkpatch:"
And then put the checkpatch message as you have done above. That gives more information about the change that was made.
julia
Quoted 57 lines
Signed-off-by Amitoj Kaur Chawla <[email protected]>--- drivers/staging/sm750fb/ddk750_chip.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-)drivers/staging/sm750fb/ddk750_chip.c +15
-15@@ -154,21 +154,21 @@ void setMemoryClock(unsigned int frequency)/* Set the corresponding divisor in the register. */ ulReg =PEEK32 (CURRENT_GATE ); -switch (divisor) { -default : -case 1 : - ulReg =FIELD_SET (ulReg,CURRENT_GATE ,M2XCLK ,DIV_1 ); -break ; -case 2 : - ulReg =FIELD_SET (ulReg,CURRENT_GATE ,M2XCLK ,DIV_2 ); -break ; -case 3 : - ulReg =FIELD_SET (ulReg,CURRENT_GATE ,M2XCLK ,DIV_3 ); -break ; -case 4 : - ulReg =FIELD_SET (ulReg,CURRENT_GATE ,M2XCLK ,DIV_4 ); -break ; - } +switch (divisor) { +default : +case 1 : + ulReg =FIELD_SET (ulReg,CURRENT_GATE ,M2XCLK ,DIV_1 ); +break ; +case 2 : + ulReg =FIELD_SET (ulReg,CURRENT_GATE ,M2XCLK ,DIV_2 ); +break ; +case 3 : + ulReg =FIELD_SET (ulReg,CURRENT_GATE ,M2XCLK ,DIV_3 ); +break ; +case 4 : + ulReg =FIELD_SET (ulReg,CURRENT_GATE ,M2XCLK ,DIV_4 ); +break ; + }setCurrentGate (ulReg); }Signature · 8 lines
1.9.1 -- You received this message because you are subscribed to the Google Groups "outreachy-kernel" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20150322041008.GA30118%40amitoj-Inspiron-3542. For more options, visit https://groups.google.com/d/optout.