* [PATCH 0/5] Fix multiple coding style issues
@ 2016-02-11 17:09 Eva Rachel Retuya
2016-02-11 17:09 ` [PATCH 1/5] staging: fbtft: Fix block comments according to kernel coding style Eva Rachel Retuya
` (4 more replies)
0 siblings, 5 replies; 11+ messages in thread
From: Eva Rachel Retuya @ 2016-02-11 17:09 UTC (permalink / raw)
To: outreachy-kernel; +Cc: Eva Rachel Retuya
Address checkpatch WARNING and CHECK issues on the fb_ili9xxx series of files.
Eva Rachel Retuya (5):
staging: fbtft: Fix block comments according to kernel coding style
staging: fbtft: Indent to match open parenthesis
staging: fbtft: Add blank line after function declaration
staging: fbtft: Remove blank line after '{' brace
staging: fbtft: Remove the use of CamelCase
drivers/staging/fbtft/fb_ili9163.c | 103 +++++++++++++++++++------------------
drivers/staging/fbtft/fb_ili9320.c | 13 ++---
drivers/staging/fbtft/fb_ili9325.c | 81 +++++++++++++++--------------
drivers/staging/fbtft/fb_ili9340.c | 8 +--
drivers/staging/fbtft/fb_ili9341.c | 19 +++----
drivers/staging/fbtft/fb_ili9481.c | 7 ++-
6 files changed, 117 insertions(+), 114 deletions(-)
--
1.9.1
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 1/5] staging: fbtft: Fix block comments according to kernel coding style
2016-02-11 17:09 [PATCH 0/5] Fix multiple coding style issues Eva Rachel Retuya
@ 2016-02-11 17:09 ` Eva Rachel Retuya
2016-02-12 3:54 ` [Outreachy kernel] " Greg KH
2016-02-11 17:09 ` [PATCH 2/5] staging: fbtft: Indent to match open parenthesis Eva Rachel Retuya
` (3 subsequent siblings)
4 siblings, 1 reply; 11+ messages in thread
From: Eva Rachel Retuya @ 2016-02-11 17:09 UTC (permalink / raw)
To: outreachy-kernel; +Cc: Eva Rachel Retuya
Add the required trailing * on subsequent lines as well as move the */
on a separate line. Checkpatch found this issue.
Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com>
---
drivers/staging/fbtft/fb_ili9163.c | 69 ++++++++++++++++----------------
drivers/staging/fbtft/fb_ili9320.c | 8 ++--
drivers/staging/fbtft/fb_ili9325.c | 80 +++++++++++++++++++-------------------
drivers/staging/fbtft/fb_ili9341.c | 8 ++--
4 files changed, 83 insertions(+), 82 deletions(-)
diff --git a/drivers/staging/fbtft/fb_ili9163.c b/drivers/staging/fbtft/fb_ili9163.c
index cbcfbb5..3f6c245 100644
--- a/drivers/staging/fbtft/fb_ili9163.c
+++ b/drivers/staging/fbtft/fb_ili9163.c
@@ -39,11 +39,11 @@
#endif
/* ILI9163C commands */
-#define CMD_FRMCTR1 0xB1 /* Frame Rate Control
- (In normal mode/Full colors) */
+#define CMD_FRMCTR1 0xB1 /* Frame Rate Control */
+ /* (In normal mode/Full colors) */
#define CMD_FRMCTR2 0xB2 /* Frame Rate Control (In Idle mode/8-colors) */
-#define CMD_FRMCTR3 0xB3 /* Frame Rate Control
- (In Partial mode/full colors) */
+#define CMD_FRMCTR3 0xB3 /* Frame Rate Control */
+ /* (In Partial mode/full colors) */
#define CMD_DINVCTR 0xB4 /* Display Inversion Control */
#define CMD_RGBBLK 0xB5 /* RGB Interface Blanking Porch setting */
#define CMD_DFUNCTR 0xB6 /* Display Function set 5 */
@@ -63,17 +63,18 @@
#define CMD_GAMRSEL 0xF2 /* GAM_R_SEL */
/*
-This display:
-http://www.ebay.com/itm/Replace-Nokia-5110-LCD-1-44-Red-Serial-128X128-SPI-Color-TFT-LCD-Display-Module-/271422122271
-This particular display has a design error! The controller has 3 pins to
-configure to constrain the memory and resolution to a fixed dimension (in
-that case 128x128) but they leaved those pins configured for 128x160 so
-there was several pixel memory addressing problems.
-I solved by setup several parameters that dinamically fix the resolution as
-needit so below the parameters for this display. If you have a strain or a
-correct display (can happen with chinese) you can copy those parameters and
-create setup for different displays.
-*/
+ * This display:
+ * http://www.ebay.com/itm/Replace-Nokia-5110-LCD-1-44-Red-Serial-128X128-SPI-
+ * Color-TFT-LCD-Display-Module-/271422122271
+ * This particular display has a design error! The controller has 3 pins to
+ * configure to constrain the memory and resolution to a fixed dimension (in
+ * that case 128x128) but they leaved those pins configured for 128x160 so
+ * there was several pixel memory addressing problems.
+ * I solved by setup several parameters that dinamically fix the resolution as
+ * needit so below the parameters for this display. If you have a strain or a
+ * correct display (can happen with chinese) you can copy those parameters and
+ * create setup for different displays.
+ */
#ifdef RED
#define __OFFSET 32 /*see note 2 - this is the red version */
@@ -153,25 +154,25 @@ static void set_addr_win(struct fbtft_par *par, int xs, int ys,
}
/*
-7) MY: 1(bottom to top), 0(top to bottom) Row Address Order
-6) MX: 1(R to L), 0(L to R) Column Address Order
-5) MV: 1(Exchanged), 0(normal) Row/Column exchange
-4) ML: 1(bottom to top), 0(top to bottom) Vertical Refresh Order
-3) RGB: 1(BGR), 0(RGB) Color Space
-2) MH: 1(R to L), 0(L to R) Horizontal Refresh Order
-1)
-0)
-
- MY, MX, MV, ML,RGB, MH, D1, D0
- 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 //normal
- 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 //Y-Mirror
- 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 //X-Mirror
- 1 | 1 | 0 | 0 | 1 | 0 | 0 | 0 //X-Y-Mirror
- 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 //X-Y Exchange
- 1 | 0 | 1 | 0 | 1 | 0 | 0 | 0 //X-Y Exchange, Y-Mirror
- 0 | 1 | 1 | 0 | 1 | 0 | 0 | 0 //XY exchange
- 1 | 1 | 1 | 0 | 1 | 0 | 0 | 0
-*/
+ * 7) MY: 1(bottom to top), 0(top to bottom) Row Address Order
+ * 6) MX: 1(R to L), 0(L to R) Column Address Order
+ * 5) MV: 1(Exchanged), 0(normal) Row/Column exchange
+ * 4) ML: 1(bottom to top), 0(top to bottom) Vertical Refresh Order
+ * 3) RGB: 1(BGR), 0(RGB) Color Space
+ * 2) MH: 1(R to L), 0(L to R) Horizontal Refresh Order
+ * 1)
+ * 0)
+ *
+ * MY, MX, MV, ML,RGB, MH, D1, D0
+ * 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 //normal
+ * 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 //Y-Mirror
+ * 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 //X-Mirror
+ * 1 | 1 | 0 | 0 | 1 | 0 | 0 | 0 //X-Y-Mirror
+ * 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 //X-Y Exchange
+ * 1 | 0 | 1 | 0 | 1 | 0 | 0 | 0 //X-Y Exchange, Y-Mirror
+ * 0 | 1 | 1 | 0 | 1 | 0 | 0 | 0 //XY exchange
+ * 1 | 1 | 1 | 0 | 1 | 0 | 0 | 0
+ */
static int set_var(struct fbtft_par *par)
{
u8 mactrl_data = 0; /* Avoid compiler warning */
diff --git a/drivers/staging/fbtft/fb_ili9320.c b/drivers/staging/fbtft/fb_ili9320.c
index 3ed50fe..5da2764 100644
--- a/drivers/staging/fbtft/fb_ili9320.c
+++ b/drivers/staging/fbtft/fb_ili9320.c
@@ -216,10 +216,10 @@ static int set_var(struct fbtft_par *par)
}
/*
- Gamma string format:
- VRP0 VRP1 RP0 RP1 KP0 KP1 KP2 KP3 KP4 KP5
- VRN0 VRN1 RN0 RN1 KN0 KN1 KN2 KN3 KN4 KN5
-*/
+ * Gamma string format:
+ * VRP0 VRP1 RP0 RP1 KP0 KP1 KP2 KP3 KP4 KP5
+ * VRN0 VRN1 RN0 RN1 KN0 KN1 KN2 KN3 KN4 KN5
+ */
#define CURVE(num, idx) curves[num * par->gamma.num_values + idx]
static int set_gamma(struct fbtft_par *par, unsigned long *curves)
{
diff --git a/drivers/staging/fbtft/fb_ili9325.c b/drivers/staging/fbtft/fb_ili9325.c
index 3b3a06d..64cdf55 100644
--- a/drivers/staging/fbtft/fb_ili9325.c
+++ b/drivers/staging/fbtft/fb_ili9325.c
@@ -56,42 +56,42 @@ module_param(vcm, uint, 0);
MODULE_PARM_DESC(vcm, "Set the internal VcomH voltage");
/*
-Verify that this configuration is within the Voltage limits
-
-Display module configuration: Vcc = IOVcc = Vci = 3.3V
-
- Voltages
-----------
-Vci = 3.3
-Vci1 = Vci * 0.80 = 2.64
-DDVDH = Vci1 * 2 = 5.28
-VCL = -Vci1 = -2.64
-VREG1OUT = Vci * 1.85 = 4.88
-VCOMH = VREG1OUT * 0.735 = 3.59
-VCOM amplitude = VREG1OUT * 0.98 = 4.79
-VGH = Vci * 4 = 13.2
-VGL = -Vci * 4 = -13.2
-
- Limits
---------
-Power supplies
-1.65 < IOVcc < 3.30 => 1.65 < 3.3 < 3.30
-2.40 < Vcc < 3.30 => 2.40 < 3.3 < 3.30
-2.50 < Vci < 3.30 => 2.50 < 3.3 < 3.30
-
-Source/VCOM power supply voltage
- 4.50 < DDVDH < 6.0 => 4.50 < 5.28 < 6.0
--3.0 < VCL < -2.0 => -3.0 < -2.64 < -2.0
-VCI - VCL < 6.0 => 5.94 < 6.0
-
-Gate driver output voltage
- 10 < VGH < 20 => 10 < 13.2 < 20
--15 < VGL < -5 => -15 < -13.2 < -5
-VGH - VGL < 32 => 26.4 < 32
-
-VCOM driver output voltage
-VCOMH - VCOML < 6.0 => 4.79 < 6.0
-*/
+ * Verify that this configuration is within the Voltage limits
+ *
+ * Display module configuration: Vcc = IOVcc = Vci = 3.3V
+ *
+ * Voltages
+ * ----------
+ * Vci = 3.3
+ * Vci1 = Vci * 0.80 = 2.64
+ * DDVDH = Vci1 * 2 = 5.28
+ * VCL = -Vci1 = -2.64
+ * VREG1OUT = Vci * 1.85 = 4.88
+ * VCOMH = VREG1OUT * 0.735 = 3.59
+ * VCOM amplitude = VREG1OUT * 0.98 = 4.79
+ * VGH = Vci * 4 = 13.2
+ * VGL = -Vci * 4 = -13.2
+ *
+ * Limits
+ * --------
+ * Power supplies
+ * 1.65 < IOVcc < 3.30 => 1.65 < 3.3 < 3.30
+ * 2.40 < Vcc < 3.30 => 2.40 < 3.3 < 3.30
+ * 2.50 < Vci < 3.30 => 2.50 < 3.3 < 3.30
+ *
+ * Source/VCOM power supply voltage
+ * 4.50 < DDVDH < 6.0 => 4.50 < 5.28 < 6.0
+ * -3.0 < VCL < -2.0 => -3.0 < -2.64 < -2.0
+ * VCI - VCL < 6.0 => 5.94 < 6.0
+ *
+ * Gate driver output voltage
+ * 10 < VGH < 20 => 10 < 13.2 < 20
+ * -15 < VGL < -5 => -15 < -13.2 < -5
+ * VGH - VGL < 32 => 26.4 < 32
+ *
+ * VCOM driver output voltage
+ * VCOMH - VCOML < 6.0 => 4.79 < 6.0
+ */
static int init_display(struct fbtft_par *par)
{
@@ -213,10 +213,10 @@ static int set_var(struct fbtft_par *par)
}
/*
- Gamma string format:
- VRP0 VRP1 RP0 RP1 KP0 KP1 KP2 KP3 KP4 KP5
- VRN0 VRN1 RN0 RN1 KN0 KN1 KN2 KN3 KN4 KN5
-*/
+ * Gamma string format:
+ * VRP0 VRP1 RP0 RP1 KP0 KP1 KP2 KP3 KP4 KP5
+ * VRN0 VRN1 RN0 RN1 KN0 KN1 KN2 KN3 KN4 KN5
+ */
#define CURVE(num, idx) curves[num * par->gamma.num_values + idx]
static int set_gamma(struct fbtft_par *par, unsigned long *curves)
{
diff --git a/drivers/staging/fbtft/fb_ili9341.c b/drivers/staging/fbtft/fb_ili9341.c
index d1e13cd..e8107d1 100644
--- a/drivers/staging/fbtft/fb_ili9341.c
+++ b/drivers/staging/fbtft/fb_ili9341.c
@@ -116,10 +116,10 @@ static int set_var(struct fbtft_par *par)
}
/*
- Gamma string format:
- Positive: Par1 Par2 [...] Par15
- Negative: Par1 Par2 [...] Par15
-*/
+ * Gamma string format:
+ * Positive: Par1 Par2 [...] Par15
+ * Negative: Par1 Par2 [...] Par15
+ */
#define CURVE(num, idx) curves[num * par->gamma.num_values + idx]
static int set_gamma(struct fbtft_par *par, unsigned long *curves)
{
--
1.9.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 2/5] staging: fbtft: Indent to match open parenthesis
2016-02-11 17:09 [PATCH 0/5] Fix multiple coding style issues Eva Rachel Retuya
2016-02-11 17:09 ` [PATCH 1/5] staging: fbtft: Fix block comments according to kernel coding style Eva Rachel Retuya
@ 2016-02-11 17:09 ` Eva Rachel Retuya
2016-02-11 17:09 ` [PATCH 3/5] staging: fbtft: Add blank line after function declaration Eva Rachel Retuya
` (2 subsequent siblings)
4 siblings, 0 replies; 11+ messages in thread
From: Eva Rachel Retuya @ 2016-02-11 17:09 UTC (permalink / raw)
To: outreachy-kernel; +Cc: Eva Rachel Retuya
Fix alignment issues by properly indenting function parameters in
accordance to the kernel coding style. Checkpatch pointed out this
issue.
CHECK: Alignment should match open parenthesis
Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com>
---
drivers/staging/fbtft/fb_ili9163.c | 33 ++++++++++++++++-----------------
drivers/staging/fbtft/fb_ili9320.c | 4 ++--
drivers/staging/fbtft/fb_ili9340.c | 8 ++++----
drivers/staging/fbtft/fb_ili9341.c | 10 +++++-----
4 files changed, 27 insertions(+), 28 deletions(-)
diff --git a/drivers/staging/fbtft/fb_ili9163.c b/drivers/staging/fbtft/fb_ili9163.c
index 3f6c245..9f7c7ec 100644
--- a/drivers/staging/fbtft/fb_ili9163.c
+++ b/drivers/staging/fbtft/fb_ili9163.c
@@ -122,7 +122,7 @@ static int init_display(struct fbtft_par *par)
}
static void set_addr_win(struct fbtft_par *par, int xs, int ys,
- int xe, int ye)
+ int xe, int ye)
{
switch (par->info->var.rotate) {
case 0:
@@ -215,22 +215,21 @@ static int gamma_adj(struct fbtft_par *par, unsigned long *curves)
CURVE(i, j) &= mask[i * par->gamma.num_values + j];
write_reg(par, CMD_PGAMMAC,
- CURVE(0, 0),
- CURVE(0, 1),
- CURVE(0, 2),
- CURVE(0, 3),
- CURVE(0, 4),
- CURVE(0, 5),
- CURVE(0, 6),
- (CURVE(0, 7) << 4) | CURVE(0, 8),
- CURVE(0, 9),
- CURVE(0, 10),
- CURVE(0, 11),
- CURVE(0, 12),
- CURVE(0, 13),
- CURVE(0, 14),
- CURVE(0, 15)
- );
+ CURVE(0, 0),
+ CURVE(0, 1),
+ CURVE(0, 2),
+ CURVE(0, 3),
+ CURVE(0, 4),
+ CURVE(0, 5),
+ CURVE(0, 6),
+ (CURVE(0, 7) << 4) | CURVE(0, 8),
+ CURVE(0, 9),
+ CURVE(0, 10),
+ CURVE(0, 11),
+ CURVE(0, 12),
+ CURVE(0, 13),
+ CURVE(0, 14),
+ CURVE(0, 15));
/* Write Data to GRAM mode */
write_reg(par, MIPI_DCS_WRITE_MEMORY_START);
diff --git a/drivers/staging/fbtft/fb_ili9320.c b/drivers/staging/fbtft/fb_ili9320.c
index 5da2764..6c6bc3d 100644
--- a/drivers/staging/fbtft/fb_ili9320.c
+++ b/drivers/staging/fbtft/fb_ili9320.c
@@ -47,10 +47,10 @@ static int init_display(struct fbtft_par *par)
devcode = read_devicecode(par);
fbtft_par_dbg(DEBUG_INIT_DISPLAY, par, "Device code: 0x%04X\n",
- devcode);
+ devcode);
if ((devcode != 0x0000) && (devcode != 0x9320))
dev_warn(par->info->device,
- "Unrecognized Device code: 0x%04X (expected 0x9320)\n",
+ "Unrecognized Device code: 0x%04X (expected 0x9320)\n",
devcode);
/* Initialization sequence from ILI9320 Application Notes */
diff --git a/drivers/staging/fbtft/fb_ili9340.c b/drivers/staging/fbtft/fb_ili9340.c
index 9b24c9e..0711121 100644
--- a/drivers/staging/fbtft/fb_ili9340.c
+++ b/drivers/staging/fbtft/fb_ili9340.c
@@ -71,13 +71,13 @@ static int init_display(struct fbtft_par *par)
/* Positive Gamma Correction */
write_reg(par, 0xE0,
- 0x0F, 0x31, 0x2B, 0x0C, 0x0E, 0x08, 0x4E, 0xF1,
- 0x37, 0x07, 0x10, 0x03, 0x0E, 0x09, 0x00);
+ 0x0F, 0x31, 0x2B, 0x0C, 0x0E, 0x08, 0x4E, 0xF1,
+ 0x37, 0x07, 0x10, 0x03, 0x0E, 0x09, 0x00);
/* Negative Gamma Correction */
write_reg(par, 0xE1,
- 0x00, 0x0E, 0x14, 0x03, 0x11, 0x07, 0x31, 0xC1,
- 0x48, 0x08, 0x0F, 0x0C, 0x31, 0x36, 0x0F);
+ 0x00, 0x0E, 0x14, 0x03, 0x11, 0x07, 0x31, 0xC1,
+ 0x48, 0x08, 0x0F, 0x0C, 0x31, 0x36, 0x0F);
write_reg(par, MIPI_DCS_EXIT_SLEEP_MODE);
diff --git a/drivers/staging/fbtft/fb_ili9341.c b/drivers/staging/fbtft/fb_ili9341.c
index e8107d1..e92d771 100644
--- a/drivers/staging/fbtft/fb_ili9341.c
+++ b/drivers/staging/fbtft/fb_ili9341.c
@@ -127,11 +127,11 @@ static int set_gamma(struct fbtft_par *par, unsigned long *curves)
for (i = 0; i < par->gamma.num_curves; i++)
write_reg(par, 0xE0 + i,
- CURVE(i, 0), CURVE(i, 1), CURVE(i, 2),
- CURVE(i, 3), CURVE(i, 4), CURVE(i, 5),
- CURVE(i, 6), CURVE(i, 7), CURVE(i, 8),
- CURVE(i, 9), CURVE(i, 10), CURVE(i, 11),
- CURVE(i, 12), CURVE(i, 13), CURVE(i, 14));
+ CURVE(i, 0), CURVE(i, 1), CURVE(i, 2),
+ CURVE(i, 3), CURVE(i, 4), CURVE(i, 5),
+ CURVE(i, 6), CURVE(i, 7), CURVE(i, 8),
+ CURVE(i, 9), CURVE(i, 10), CURVE(i, 11),
+ CURVE(i, 12), CURVE(i, 13), CURVE(i, 14));
return 0;
}
--
1.9.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 3/5] staging: fbtft: Add blank line after function declaration
2016-02-11 17:09 [PATCH 0/5] Fix multiple coding style issues Eva Rachel Retuya
2016-02-11 17:09 ` [PATCH 1/5] staging: fbtft: Fix block comments according to kernel coding style Eva Rachel Retuya
2016-02-11 17:09 ` [PATCH 2/5] staging: fbtft: Indent to match open parenthesis Eva Rachel Retuya
@ 2016-02-11 17:09 ` Eva Rachel Retuya
2016-02-12 17:09 ` [Outreachy kernel] " Tejun Heo
2016-02-11 17:09 ` [PATCH 4/5] staging: fbtft: Remove blank line after '{' brace Eva Rachel Retuya
2016-02-11 17:09 ` [PATCH 5/5] staging: fbtft: Remove the use of CamelCase Eva Rachel Retuya
4 siblings, 1 reply; 11+ messages in thread
From: Eva Rachel Retuya @ 2016-02-11 17:09 UTC (permalink / raw)
To: outreachy-kernel; +Cc: Eva Rachel Retuya
Insert the required whitespace after the function declaration as
suggested by checkpatch.
CHECK: Please use a blank line after function/struct/union/enum
declarations
Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com>
---
drivers/staging/fbtft/fb_ili9163.c | 1 +
drivers/staging/fbtft/fb_ili9320.c | 1 +
drivers/staging/fbtft/fb_ili9325.c | 1 +
drivers/staging/fbtft/fb_ili9341.c | 1 +
4 files changed, 4 insertions(+)
diff --git a/drivers/staging/fbtft/fb_ili9163.c b/drivers/staging/fbtft/fb_ili9163.c
index 9f7c7ec..6b8f8b1 100644
--- a/drivers/staging/fbtft/fb_ili9163.c
+++ b/drivers/staging/fbtft/fb_ili9163.c
@@ -236,6 +236,7 @@ static int gamma_adj(struct fbtft_par *par, unsigned long *curves)
return 0;
}
+
#undef CURVE
#endif
diff --git a/drivers/staging/fbtft/fb_ili9320.c b/drivers/staging/fbtft/fb_ili9320.c
index 6c6bc3d..6ff222d 100644
--- a/drivers/staging/fbtft/fb_ili9320.c
+++ b/drivers/staging/fbtft/fb_ili9320.c
@@ -248,6 +248,7 @@ static int set_gamma(struct fbtft_par *par, unsigned long *curves)
return 0;
}
+
#undef CURVE
static struct fbtft_display display = {
diff --git a/drivers/staging/fbtft/fb_ili9325.c b/drivers/staging/fbtft/fb_ili9325.c
index 64cdf55..fdf98d3 100644
--- a/drivers/staging/fbtft/fb_ili9325.c
+++ b/drivers/staging/fbtft/fb_ili9325.c
@@ -245,6 +245,7 @@ static int set_gamma(struct fbtft_par *par, unsigned long *curves)
return 0;
}
+
#undef CURVE
static struct fbtft_display display = {
diff --git a/drivers/staging/fbtft/fb_ili9341.c b/drivers/staging/fbtft/fb_ili9341.c
index e92d771..ff35c86 100644
--- a/drivers/staging/fbtft/fb_ili9341.c
+++ b/drivers/staging/fbtft/fb_ili9341.c
@@ -135,6 +135,7 @@ static int set_gamma(struct fbtft_par *par, unsigned long *curves)
return 0;
}
+
#undef CURVE
static struct fbtft_display display = {
--
1.9.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 4/5] staging: fbtft: Remove blank line after '{' brace
2016-02-11 17:09 [PATCH 0/5] Fix multiple coding style issues Eva Rachel Retuya
` (2 preceding siblings ...)
2016-02-11 17:09 ` [PATCH 3/5] staging: fbtft: Add blank line after function declaration Eva Rachel Retuya
@ 2016-02-11 17:09 ` Eva Rachel Retuya
2016-02-11 17:09 ` [PATCH 5/5] staging: fbtft: Remove the use of CamelCase Eva Rachel Retuya
4 siblings, 0 replies; 11+ messages in thread
From: Eva Rachel Retuya @ 2016-02-11 17:09 UTC (permalink / raw)
To: outreachy-kernel; +Cc: Eva Rachel Retuya
Omit the whitespace after '{' brace as suggested by checkpatch.
CHECK: Blank lines aren't necessary after an open brace '{'
Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com>
---
drivers/staging/fbtft/fb_ili9481.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/staging/fbtft/fb_ili9481.c b/drivers/staging/fbtft/fb_ili9481.c
index 6fa5e4c..fb0e6c3 100644
--- a/drivers/staging/fbtft/fb_ili9481.c
+++ b/drivers/staging/fbtft/fb_ili9481.c
@@ -28,7 +28,6 @@
#define HEIGHT 480
static int default_init_sequence[] = {
-
/* SLP_OUT - Sleep out */
-1, MIPI_DCS_EXIT_SLEEP_MODE,
-2, 50,
--
1.9.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 5/5] staging: fbtft: Remove the use of CamelCase
2016-02-11 17:09 [PATCH 0/5] Fix multiple coding style issues Eva Rachel Retuya
` (3 preceding siblings ...)
2016-02-11 17:09 ` [PATCH 4/5] staging: fbtft: Remove blank line after '{' brace Eva Rachel Retuya
@ 2016-02-11 17:09 ` Eva Rachel Retuya
2016-02-12 17:10 ` [Outreachy kernel] " Tejun Heo
4 siblings, 1 reply; 11+ messages in thread
From: Eva Rachel Retuya @ 2016-02-11 17:09 UTC (permalink / raw)
To: outreachy-kernel; +Cc: Eva Rachel Retuya
Rename the macro defining constant ROWxCOL into ROW_X_COL to remove
checkpatch check concerning use of CamelCase and to achieve better
readability.
CHECK: Avoid CamelCase: <ROWxCOL>
Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com>
---
drivers/staging/fbtft/fb_ili9481.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/fbtft/fb_ili9481.c b/drivers/staging/fbtft/fb_ili9481.c
index fb0e6c3..242adb3 100644
--- a/drivers/staging/fbtft/fb_ili9481.c
+++ b/drivers/staging/fbtft/fb_ili9481.c
@@ -64,13 +64,13 @@ static void set_addr_win(struct fbtft_par *par, int xs, int ys, int xe, int ye)
#define HFLIP 0x01
#define VFLIP 0x02
-#define ROWxCOL 0x20
+#define ROW_X_COL 0x20
static int set_var(struct fbtft_par *par)
{
switch (par->info->var.rotate) {
case 270:
write_reg(par, MIPI_DCS_SET_ADDRESS_MODE,
- ROWxCOL | HFLIP | VFLIP | (par->bgr << 3));
+ ROW_X_COL | HFLIP | VFLIP | (par->bgr << 3));
break;
case 180:
write_reg(par, MIPI_DCS_SET_ADDRESS_MODE,
@@ -78,7 +78,7 @@ static int set_var(struct fbtft_par *par)
break;
case 90:
write_reg(par, MIPI_DCS_SET_ADDRESS_MODE,
- ROWxCOL | (par->bgr << 3));
+ ROW_X_COL | (par->bgr << 3));
break;
default:
write_reg(par, MIPI_DCS_SET_ADDRESS_MODE,
--
1.9.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [Outreachy kernel] [PATCH 1/5] staging: fbtft: Fix block comments according to kernel coding style
2016-02-11 17:09 ` [PATCH 1/5] staging: fbtft: Fix block comments according to kernel coding style Eva Rachel Retuya
@ 2016-02-12 3:54 ` Greg KH
0 siblings, 0 replies; 11+ messages in thread
From: Greg KH @ 2016-02-12 3:54 UTC (permalink / raw)
To: Eva Rachel Retuya; +Cc: outreachy-kernel
On Fri, Feb 12, 2016 at 01:09:06AM +0800, Eva Rachel Retuya wrote:
> Add the required trailing * on subsequent lines as well as move the */
> on a separate line. Checkpatch found this issue.
>
> Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com>
If I didn't know better, I would think you already sent this series
before, as the subject: lines are identical :(
Please fix that up and resend this series.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Outreachy kernel] [PATCH 3/5] staging: fbtft: Add blank line after function declaration
2016-02-11 17:09 ` [PATCH 3/5] staging: fbtft: Add blank line after function declaration Eva Rachel Retuya
@ 2016-02-12 17:09 ` Tejun Heo
2016-02-13 6:33 ` Eva Rachel Retuya
0 siblings, 1 reply; 11+ messages in thread
From: Tejun Heo @ 2016-02-12 17:09 UTC (permalink / raw)
To: Eva Rachel Retuya; +Cc: outreachy-kernel
Hello, Eva.
On Fri, Feb 12, 2016 at 01:09:08AM +0800, Eva Rachel Retuya wrote:
> Insert the required whitespace after the function declaration as
> suggested by checkpatch.
>
> CHECK: Please use a blank line after function/struct/union/enum
> declarations
While checkpatch suggestions can be useful, I don't think following
them blindly is a good idea.
> diff --git a/drivers/staging/fbtft/fb_ili9163.c b/drivers/staging/fbtft/fb_ili9163.c
> index 9f7c7ec..6b8f8b1 100644
> --- a/drivers/staging/fbtft/fb_ili9163.c
> +++ b/drivers/staging/fbtft/fb_ili9163.c
> @@ -236,6 +236,7 @@ static int gamma_adj(struct fbtft_par *par, unsigned long *curves)
>
> return 0;
> }
> +
> #undef CURVE
> #endif
I don't think this improves anything and it also breaks symmetry with
the matching #ifdef above.
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Outreachy kernel] [PATCH 5/5] staging: fbtft: Remove the use of CamelCase
2016-02-11 17:09 ` [PATCH 5/5] staging: fbtft: Remove the use of CamelCase Eva Rachel Retuya
@ 2016-02-12 17:10 ` Tejun Heo
2016-02-13 6:51 ` Eva Rachel Retuya
0 siblings, 1 reply; 11+ messages in thread
From: Tejun Heo @ 2016-02-12 17:10 UTC (permalink / raw)
To: Eva Rachel Retuya; +Cc: outreachy-kernel
On Fri, Feb 12, 2016 at 01:09:10AM +0800, Eva Rachel Retuya wrote:
> Rename the macro defining constant ROWxCOL into ROW_X_COL to remove
> checkpatch check concerning use of CamelCase and to achieve better
> readability.
>
> CHECK: Avoid CamelCase: <ROWxCOL>
>
> Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com>
> ---
> drivers/staging/fbtft/fb_ili9481.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/staging/fbtft/fb_ili9481.c b/drivers/staging/fbtft/fb_ili9481.c
> index fb0e6c3..242adb3 100644
> --- a/drivers/staging/fbtft/fb_ili9481.c
> +++ b/drivers/staging/fbtft/fb_ili9481.c
> @@ -64,13 +64,13 @@ static void set_addr_win(struct fbtft_par *par, int xs, int ys, int xe, int ye)
>
> #define HFLIP 0x01
> #define VFLIP 0x02
> -#define ROWxCOL 0x20
> +#define ROW_X_COL 0x20
This really isn't camelcasing. I can't see how this change is
beneficial.
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Outreachy kernel] [PATCH 3/5] staging: fbtft: Add blank line after function declaration
2016-02-12 17:09 ` [Outreachy kernel] " Tejun Heo
@ 2016-02-13 6:33 ` Eva Rachel Retuya
0 siblings, 0 replies; 11+ messages in thread
From: Eva Rachel Retuya @ 2016-02-13 6:33 UTC (permalink / raw)
To: Tejun Heo; +Cc: outreachy-kernel
On Fri, Feb 12, 2016 at 12:09:30PM -0500, Tejun Heo wrote:
> Hello, Eva.
>
> On Fri, Feb 12, 2016 at 01:09:08AM +0800, Eva Rachel Retuya wrote:
> > Insert the required whitespace after the function declaration as
> > suggested by checkpatch.
> >
> > CHECK: Please use a blank line after function/struct/union/enum
> > declarations
>
> While checkpatch suggestions can be useful, I don't think following
> them blindly is a good idea.
>
> > diff --git a/drivers/staging/fbtft/fb_ili9163.c b/drivers/staging/fbtft/fb_ili9163.c
> > index 9f7c7ec..6b8f8b1 100644
> > --- a/drivers/staging/fbtft/fb_ili9163.c
> > +++ b/drivers/staging/fbtft/fb_ili9163.c
> > @@ -236,6 +236,7 @@ static int gamma_adj(struct fbtft_par *par, unsigned long *curves)
> >
> > return 0;
> > }
> > +
> > #undef CURVE
> > #endif
>
> I don't think this improves anything and it also breaks symmetry with
> the matching #ifdef above.
>
> Thanks.
>
> --
> tejun
Thank you for your input. I will keep this in mind on my future patches.
Eva
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Outreachy kernel] [PATCH 5/5] staging: fbtft: Remove the use of CamelCase
2016-02-12 17:10 ` [Outreachy kernel] " Tejun Heo
@ 2016-02-13 6:51 ` Eva Rachel Retuya
0 siblings, 0 replies; 11+ messages in thread
From: Eva Rachel Retuya @ 2016-02-13 6:51 UTC (permalink / raw)
To: Tejun Heo; +Cc: outreachy-kernel, gregkh
On Fri, Feb 12, 2016 at 12:10:24PM -0500, Tejun Heo wrote:
> On Fri, Feb 12, 2016 at 01:09:10AM +0800, Eva Rachel Retuya wrote:
> > Rename the macro defining constant ROWxCOL into ROW_X_COL to remove
> > checkpatch check concerning use of CamelCase and to achieve better
> > readability.
> >
> > CHECK: Avoid CamelCase: <ROWxCOL>
> >
> > Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com>
> > ---
> > drivers/staging/fbtft/fb_ili9481.c | 6 +++---
> > 1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/staging/fbtft/fb_ili9481.c b/drivers/staging/fbtft/fb_ili9481.c
> > index fb0e6c3..242adb3 100644
> > --- a/drivers/staging/fbtft/fb_ili9481.c
> > +++ b/drivers/staging/fbtft/fb_ili9481.c
> > @@ -64,13 +64,13 @@ static void set_addr_win(struct fbtft_par *par, int xs, int ys, int xe, int ye)
> >
> > #define HFLIP 0x01
> > #define VFLIP 0x02
> > -#define ROWxCOL 0x20
> > +#define ROW_X_COL 0x20
>
> This really isn't camelcasing. I can't see how this change is
> beneficial.
>
> Thanks.
>
> --
> tejun
My bad, you are indeed correct. My apologies. I was set on getting rid
of the "check".
I'll CC Greg to let him know not to apply this patch.
Thanks,
Eva
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2016-02-13 6:51 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-11 17:09 [PATCH 0/5] Fix multiple coding style issues Eva Rachel Retuya
2016-02-11 17:09 ` [PATCH 1/5] staging: fbtft: Fix block comments according to kernel coding style Eva Rachel Retuya
2016-02-12 3:54 ` [Outreachy kernel] " Greg KH
2016-02-11 17:09 ` [PATCH 2/5] staging: fbtft: Indent to match open parenthesis Eva Rachel Retuya
2016-02-11 17:09 ` [PATCH 3/5] staging: fbtft: Add blank line after function declaration Eva Rachel Retuya
2016-02-12 17:09 ` [Outreachy kernel] " Tejun Heo
2016-02-13 6:33 ` Eva Rachel Retuya
2016-02-11 17:09 ` [PATCH 4/5] staging: fbtft: Remove blank line after '{' brace Eva Rachel Retuya
2016-02-11 17:09 ` [PATCH 5/5] staging: fbtft: Remove the use of CamelCase Eva Rachel Retuya
2016-02-12 17:10 ` [Outreachy kernel] " Tejun Heo
2016-02-13 6:51 ` Eva Rachel Retuya
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.