* [PATCH 1/6] staging: sm750fb: Rename miniDiff
2015-10-09 20:41 [PATCH 0/6] Fix multiple checkpatch issues Amitoj Kaur Chawla
@ 2015-10-09 20:44 ` Amitoj Kaur Chawla
2015-10-09 20:46 ` [PATCH 2/6] staging: sm750fb: Remove multiple blank lines Amitoj Kaur Chawla
` (4 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: Amitoj Kaur Chawla @ 2015-10-09 20:44 UTC (permalink / raw)
To: outreachy-kernel
Rename miniDiff to mini_diff to avoid CamelCase. Problem found using
checkpatch.pl
CHECK: Avoid CamelCase: <miniDiff>
Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
---
drivers/staging/sm750fb/ddk750_chip.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/sm750fb/ddk750_chip.c b/drivers/staging/sm750fb/ddk750_chip.c
index f9960f5..5cf28d9 100644
--- a/drivers/staging/sm750fb/ddk750_chip.c
+++ b/drivers/staging/sm750fb/ddk750_chip.c
@@ -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;
}
}
--
1.9.1
^ permalink raw reply related [flat|nested] 8+ messages in thread* [PATCH 2/6] staging: sm750fb: Remove multiple blank lines
2015-10-09 20:41 [PATCH 0/6] Fix multiple checkpatch issues Amitoj Kaur Chawla
2015-10-09 20:44 ` [PATCH 1/6] staging: sm750fb: Rename miniDiff Amitoj Kaur Chawla
@ 2015-10-09 20:46 ` Amitoj Kaur Chawla
2015-10-09 20:47 ` [PATCH 3/6] staging: sm750fb: Rename dispState Amitoj Kaur Chawla
` (3 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: Amitoj Kaur Chawla @ 2015-10-09 20:46 UTC (permalink / raw)
To: outreachy-kernel
Remove multiple blank lines. Problem found using checkpatch.pl
CHECK: Please don't use multiple blank lines
Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
---
drivers/staging/sm750fb/ddk750_chip.h | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/staging/sm750fb/ddk750_chip.h b/drivers/staging/sm750fb/ddk750_chip.h
index 6e87a17..0891384 100644
--- a/drivers/staging/sm750fb/ddk750_chip.h
+++ b/drivers/staging/sm750fb/ddk750_chip.h
@@ -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
--
1.9.1
^ permalink raw reply related [flat|nested] 8+ messages in thread* [PATCH 3/6] staging: sm750fb: Rename dispState
2015-10-09 20:41 [PATCH 0/6] Fix multiple checkpatch issues Amitoj Kaur Chawla
2015-10-09 20:44 ` [PATCH 1/6] staging: sm750fb: Rename miniDiff Amitoj Kaur Chawla
2015-10-09 20:46 ` [PATCH 2/6] staging: sm750fb: Remove multiple blank lines Amitoj Kaur Chawla
@ 2015-10-09 20:47 ` Amitoj Kaur Chawla
2015-10-09 20:49 ` [PATCH 4/6] staging: sm750fb: Remove multiple blank lines Amitoj Kaur Chawla
` (2 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: Amitoj Kaur Chawla @ 2015-10-09 20:47 UTC (permalink / raw)
To: outreachy-kernel
Rename dispState to disp_state to avoid CamelCase. Problem found using
checkpatch.pl
CHECK: Avoid CamelCase: <dispState>
Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
---
drivers/staging/sm750fb/ddk750_display.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/sm750fb/ddk750_display.c b/drivers/staging/sm750fb/ddk750_display.c
index 24c1c82..3691db1 100644
--- a/drivers/staging/sm750fb/ddk750_display.c
+++ b/drivers/staging/sm750fb/ddk750_display.c
@@ -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.
*/
--
1.9.1
^ permalink raw reply related [flat|nested] 8+ messages in thread* [PATCH 4/6] staging: sm750fb: Remove multiple blank lines
2015-10-09 20:41 [PATCH 0/6] Fix multiple checkpatch issues Amitoj Kaur Chawla
` (2 preceding siblings ...)
2015-10-09 20:47 ` [PATCH 3/6] staging: sm750fb: Rename dispState Amitoj Kaur Chawla
@ 2015-10-09 20:49 ` Amitoj Kaur Chawla
2015-10-09 20:50 ` [PATCH 5/6] staging: sm750fb: Add space around '<<' Amitoj Kaur Chawla
2015-10-09 20:51 ` [PATCH 6/6] staging: sm750fb: Add space around '&' Amitoj Kaur Chawla
5 siblings, 0 replies; 8+ messages in thread
From: Amitoj Kaur Chawla @ 2015-10-09 20:49 UTC (permalink / raw)
To: outreachy-kernel
Remove multiple blank lines. Problem found using checkpatch.pl
CHECK: Please don't use multiple blank lines
Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
---
drivers/staging/sm750fb/ddk750_display.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/staging/sm750fb/ddk750_display.c b/drivers/staging/sm750fb/ddk750_display.c
index 3691db1..91ee375 100644
--- a/drivers/staging/sm750fb/ddk750_display.c
+++ b/drivers/staging/sm750fb/ddk750_display.c
@@ -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);
--
1.9.1
^ permalink raw reply related [flat|nested] 8+ messages in thread* [PATCH 5/6] staging: sm750fb: Add space around '<<'
2015-10-09 20:41 [PATCH 0/6] Fix multiple checkpatch issues Amitoj Kaur Chawla
` (3 preceding siblings ...)
2015-10-09 20:49 ` [PATCH 4/6] staging: sm750fb: Remove multiple blank lines Amitoj Kaur Chawla
@ 2015-10-09 20:50 ` Amitoj Kaur Chawla
2015-10-09 20:51 ` [PATCH 6/6] staging: sm750fb: Add space around '&' Amitoj Kaur Chawla
5 siblings, 0 replies; 8+ messages in thread
From: Amitoj Kaur Chawla @ 2015-10-09 20:50 UTC (permalink / raw)
To: outreachy-kernel
Add space around operator '<<'. Problem found using
checkpatch.pl
CHECK: spaces preferred around that '<<' (ctx:VxV)
Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
---
drivers/staging/sm750fb/ddk750_display.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/sm750fb/ddk750_display.c b/drivers/staging/sm750fb/ddk750_display.c
index 91ee375..f8005c2 100644
--- a/drivers/staging/sm750fb/ddk750_display.c
+++ b/drivers/staging/sm750fb/ddk750_display.c
@@ -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);
--
1.9.1
^ permalink raw reply related [flat|nested] 8+ messages in thread* [PATCH 6/6] staging: sm750fb: Add space around '&'
2015-10-09 20:41 [PATCH 0/6] Fix multiple checkpatch issues Amitoj Kaur Chawla
` (4 preceding siblings ...)
2015-10-09 20:50 ` [PATCH 5/6] staging: sm750fb: Add space around '<<' Amitoj Kaur Chawla
@ 2015-10-09 20:51 ` Amitoj Kaur Chawla
5 siblings, 0 replies; 8+ messages in thread
From: Amitoj Kaur Chawla @ 2015-10-09 20:51 UTC (permalink / raw)
To: outreachy-kernel
Add space around operator '&'. Problem found using
checkpatch.pl
CHECK: spaces preferred around that '&' (ctx:VxV)
Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
---
drivers/staging/sm750fb/ddk750_display.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/sm750fb/ddk750_display.c b/drivers/staging/sm750fb/ddk750_display.c
index f8005c2..84f6e8b 100644
--- a/drivers/staging/sm750fb/ddk750_display.c
+++ b/drivers/staging/sm750fb/ddk750_display.c
@@ -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)
--
1.9.1
^ permalink raw reply related [flat|nested] 8+ messages in thread