Fix multiple checkpatch issues
Subsystems (2)
cover Fix multiple checkpatch issues
This patchset fixes multiple issues found using checkpatch.pl
Amitoj Kaur Chawla (6):
staging: sm750fb: Rename miniDiff
staging: sm750fb: Remove multiple blank lines
staging: sm750fb: Rename dispState
staging: sm750fb: Remove multiple blank lines
staging: sm750fb: Add space around '<<'
staging: sm750fb: Add space around '&'
drivers/staging/sm750fb/ddk750_chip.c | 8 ++++---- drivers/staging/sm750fb/ddk750_chip.h | 3 --- drivers/staging/sm750fb/ddk750_display.c | 17 +++++++---------- 3 files changed, 11 insertions(+), 17 deletions(-)
Signature · 1 line
1.9.1
PATCH 1/6 staging: sm750fb: Rename miniDiff
Rename miniDiff to mini_diff to avoid CamelCase. Problem found using checkpatch.pl
CHECK: Avoid CamelCase: <miniDiff>
--- drivers/staging/sm750fb/ddk750_chip.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/staging/sm750fb/ddk750_chip.c +4 -4
@@ -358,7 +358,7 @@ unsigned int calcPllValue(unsigned int request_orig, pll_value_t *pll)/* as sm750 register definition, N located in 2,15 and M located in 1,255 */ int N ,M ,X , d;int xcnt; -int miniDiff; +int mini_diff;unsigned int RN , quo, rem, fl_quo;unsigned int input, request;unsigned int tmpClock, ret;
@@ -373,7 +373,7 @@ unsigned int calcPllValue(unsigned int request_orig, pll_value_t *pll)#endif ret =0 ; - miniDiff = ~0 ; + mini_diff = ~0 ; request = request_orig /1000 ; input = pll->inputFreq /1000 ;
@@ -405,12 +405,12 @@ unsigned int calcPllValue(unsigned int request_orig, pll_value_t *pll) tmpClock = pll->inputFreq *M /N /X ; diff =absDiff (tmpClock, request_orig); -if (diff < miniDiff) { +if (diff < mini_diff) { pll->M =M ; pll->N =N ; pll->OD = xparm[d].od; pll->POD = xparm[d].pod; - miniDiff = diff; + mini_diff = diff; ret = tmpClock; } }
Signature · 1 line
1.9.1
PATCH 2/6 staging: sm750fb: Remove multiple blank lines
In reply to Amitoj Kaur ChawlaRemove multiple blank lines. Problem found using checkpatch.pl
CHECK: Please don't use multiple blank lines
--- drivers/staging/sm750fb/ddk750_chip.h | 3 --- 1 file changed, 3 deletions(-)
drivers/staging/sm750fb/ddk750_chip.h +0 -3
@@ -16,7 +16,6 @@ typedef enum _logical_chip_type_t { } logical_chip_type_t; - typedef enum _clock_type_t { MXCLK_PLL, PRIMARY_PLL,
@@ -70,7 +69,6 @@ typedef struct _initchip_param_t { } initchip_param_t; -logical_chip_type_t getChipType (void );unsigned int calcPllValue (unsigned int request,pll_value_t *pll);unsigned int formatPllReg (pll_value_t *pPLL);
@@ -78,5 +76,4 @@ void ddk750_set_mmio(void __iomem *, unsigned short, char);unsigned int ddk750_getVMSize (void );int ddk750_initHw (initchip_param_t *); -#endif
Signature · 1 line
1.9.1
PATCH 3/6 staging: sm750fb: Rename dispState
In reply to Amitoj Kaur ChawlaRename dispState to disp_state to avoid CamelCase. Problem found using checkpatch.pl
CHECK: Avoid CamelCase: <dispState>
--- drivers/staging/sm750fb/ddk750_display.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/sm750fb/ddk750_display.c +3 -3
@@ -6,7 +6,7 @@#define primaryWaitVerticalSync (delay) waitNextVerticalSync(0, delay) -static void setDisplayControl (int ctrl,int dispState) +static void setDisplayControl (int ctrl,int disp_state) {/* state != 0 means turn on both timing & plane en_bit */ unsigned long ulDisplayCtrlReg, ulReservedBits;
@@ -18,7 +18,7 @@ static void setDisplayControl(int ctrl, int dispState)if (!ctrl) { ulDisplayCtrlReg =PEEK32 (PANEL_DISPLAY_CTRL );/* Turn on/off the Panel display control */ -if (dispState) { +if (disp_state) {/* Timing should be enabled first before enabling the plane * because changing at the same time does not guarantee that * the plane will also enabled or disabled.
@@ -70,7 +70,7 @@ static void setDisplayControl(int ctrl, int dispState)/* Set the secondary display control */ ulDisplayCtrlReg =PEEK32 (CRT_DISPLAY_CTRL ); -if (dispState) { +if (disp_state) {/* Timing should be enabled first before enabling the plane because changing at the same time does not guarantee that the plane will also enabled or disabled. */
Signature · 1 line
1.9.1
PATCH 4/6 staging: sm750fb: Remove multiple blank lines
In reply to Amitoj Kaur ChawlaRemove multiple blank lines. Problem found using checkpatch.pl
CHECK: Please don't use multiple blank lines
--- drivers/staging/sm750fb/ddk750_display.c | 3 --- 1 file changed, 3 deletions(-)
drivers/staging/sm750fb/ddk750_display.c +0 -3
@@ -117,7 +117,6 @@ static void setDisplayControl(int ctrl, int disp_state) } } -static void waitNextVerticalSync (int ctrl,int delay) {unsigned int status;
@@ -189,7 +188,6 @@ static void swPanelPowerSequence(int disp, int delay)POKE32 (PANEL_DISPLAY_CTRL , reg);primaryWaitVerticalSync (delay); - reg =PEEK32 (PANEL_DISPLAY_CTRL ); reg =FIELD_VALUE (reg,PANEL_DISPLAY_CTRL ,DATA , disp);POKE32 (PANEL_DISPLAY_CTRL , reg);
@@ -200,7 +198,6 @@ static void swPanelPowerSequence(int disp, int delay)POKE32 (PANEL_DISPLAY_CTRL , reg);primaryWaitVerticalSync (delay); - reg =PEEK32 (PANEL_DISPLAY_CTRL ); reg =FIELD_VALUE (reg,PANEL_DISPLAY_CTRL ,FPEN , disp);POKE32 (PANEL_DISPLAY_CTRL , reg);
Signature · 1 line
1.9.1
PATCH 5/6 staging: sm750fb: Add space around '<<'
In reply to Amitoj Kaur ChawlaAdd space around operator '<<'. Problem found using checkpatch.pl
CHECK: spaces preferred around that '<<' (ctx:VxV)
--- drivers/staging/sm750fb/ddk750_display.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/staging/sm750fb/ddk750_display.c +4 -4
@@ -228,21 +228,21 @@ void ddk750_setLogicalDispOut(disp_output_t output)if (output &PRI_TP_USAGE ) {/* set primary timing and plane en_bit */ -setDisplayControl (0 , (output&PRI_TP_MASK )>>PRI_TP_OFFSET ); +setDisplayControl (0 , (output&PRI_TP_MASK ) >>PRI_TP_OFFSET ); }if (output &SEC_TP_USAGE ) {/* set secondary timing and plane en_bit*/ -setDisplayControl (1 , (output&SEC_TP_MASK )>>SEC_TP_OFFSET ); +setDisplayControl (1 , (output&SEC_TP_MASK ) >>SEC_TP_OFFSET ); }if (output &PNL_SEQ_USAGE ) {/* set panel sequence */ -swPanelPowerSequence ((output&PNL_SEQ_MASK )>>PNL_SEQ_OFFSET ,4 ); +swPanelPowerSequence ((output&PNL_SEQ_MASK ) >>PNL_SEQ_OFFSET ,4 ); }if (output &DAC_USAGE ) -setDAC ((output &DAC_MASK )>>DAC_OFFSET ); +setDAC ((output &DAC_MASK ) >>DAC_OFFSET );if (output &DPMS_USAGE )ddk750_setDPMS ((output &DPMS_MASK ) >>DPMS_OFFSET );
Signature · 1 line
1.9.1
PATCH 6/6 staging: sm750fb: Add space around '&'
In reply to Amitoj Kaur ChawlaAdd space around operator '&'. Problem found using checkpatch.pl
CHECK: spaces preferred around that '&' (ctx:VxV)
--- drivers/staging/sm750fb/ddk750_display.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/sm750fb/ddk750_display.c +3 -3
@@ -228,17 +228,17 @@ void ddk750_setLogicalDispOut(disp_output_t output)if (output &PRI_TP_USAGE ) {/* set primary timing and plane en_bit */ -setDisplayControl (0 , (output&PRI_TP_MASK ) >>PRI_TP_OFFSET ); +setDisplayControl (0 , (output &PRI_TP_MASK ) >>PRI_TP_OFFSET ); }if (output &SEC_TP_USAGE ) {/* set secondary timing and plane en_bit*/ -setDisplayControl (1 , (output&SEC_TP_MASK ) >>SEC_TP_OFFSET ); +setDisplayControl (1 , (output &SEC_TP_MASK ) >>SEC_TP_OFFSET ); }if (output &PNL_SEQ_USAGE ) {/* set panel sequence */ -swPanelPowerSequence ((output&PNL_SEQ_MASK ) >>PNL_SEQ_OFFSET ,4 ); +swPanelPowerSequence ((output &PNL_SEQ_MASK ) >>PNL_SEQ_OFFSET ,4 ); }if (output &DAC_USAGE )
Signature · 1 line
1.9.1