Skip to contentSkip to conversation

staging: fb_tinylcd Alignment to open parenthesis

PATCH In review Ashok Kumar 3 participants 5 messages May 3, 2024 – May 4, 2024 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): ZjRDUO6/M+RDCcQJ.ref@c

#1 lore raw

PATCH 1/1 staging: fb_tinylcd Alignment to open parenthesis

Corrected coding style CHECK: Alignment should match open parenthesis

---
 drivers/staging/fbtft/fb_tinylcd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/fbtft/fb_tinylcd.c +1 -1
index 9469248f2c50..60cda57bcb33 100644
@@ -38,7 +38,7 @@ static int init_display(struct fbtft_par *par)
 	write_reg(par, 0xE5, 0x00);
 	write_reg(par, 0xF0, 0x36, 0xA5, 0x53);
 	write_reg(par, 0xE0, 0x00, 0x35, 0x33, 0x00, 0x00, 0x00,
-		       0x00, 0x35, 0x33, 0x00, 0x00, 0x00);
+		  0x00, 0x35, 0x33, 0x00, 0x00, 0x00);
 	write_reg(par, MIPI_DCS_SET_PIXEL_FORMAT, 0x55);
 	write_reg(par, MIPI_DCS_EXIT_SLEEP_MODE);
 	udelay(250);
Signature · 1 line
2.34.1
#2 lore raw
Quoted 2 lines · Ashok Kumar

Corrected coding style CHECK: Alignment should match open parenthesis

The original author was aligned it deliberately to improve readability.

Just ignore checkpatch on this.

regards,
dan carpenter

#3 lore raw
In reply to Ashok Kumar
Quoted 1 line · Ashok Kumar

Corrected coding style CHECK: Alignment should match open parenthesis

Ashok, I think the code is nicer as is, because it has all the constant numbers lined up.

julia

Quoted 24 lines
---
 drivers/staging/fbtft/fb_tinylcd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/fbtft/fb_tinylcd.c +1 -2
index 9469248f2c50..60cda57bcb33 100644
@@ -38,7 +38,7 @@ static int init_display(struct fbtft_par *par)
 	write_reg(par, 0xE5, 0x00);
 	write_reg(par, 0xF0, 0x36, 0xA5, 0x53);
 	write_reg(par, 0xE0, 0x00, 0x35, 0x33, 0x00, 0x00, 0x00,
-		       0x00, 0x35, 0x33, 0x00, 0x00, 0x00);
+		  0x00, 0x35, 0x33, 0x00, 0x00, 0x00);
 	write_reg(par, MIPI_DCS_SET_PIXEL_FORMAT, 0x55);
 	write_reg(par, MIPI_DCS_EXIT_SLEEP_MODE);
 	udelay(250);
--

2.34.1

#4 lore raw

On Thursday, May 2, 2024 at 11:54:58 PM PDT, Julia Lawall <[email protected]> wrote:

Quoted 1 line · Ashok Kumar

Corrected coding style CHECK: Alignment should match open parenthesis

Ashok, I think the code is nicer as is, because it has all the constant numbers lined up.

julia

Thanks for the update I will ignore this change.

Is there a list of exceptions to the checkpatch information that we can ignore in general.

Quoted 24 lines

---
  drivers/staging/fbtft/fb_tinylcd.c | 2 +-

  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/fbtft/fb_tinylcd.c +1 -2
index 9469248f2c50..60cda57bcb33 100644
@@ -38,7 +38,7 @@ static int init_display(struct fbtft_par *par)
       write_reg(par, 0xE5, 0x00);
       write_reg(par, 0xF0, 0x36, 0xA5, 0x53);
       write_reg(par, 0xE0, 0x00, 0x35, 0x33, 0x00, 0x00, 0x00,
-              0x00, 0x35, 0x33, 0x00, 0x00, 0x00);
+          0x00, 0x35, 0x33, 0x00, 0x00, 0x00);
       write_reg(par, MIPI_DCS_SET_PIXEL_FORMAT, 0x55);
       write_reg(par, MIPI_DCS_EXIT_SLEEP_MODE);
       udelay(250);
--

2.34.1

#5 lore raw
Quoted 3 lines · Ashok Kumar

Is there a list of exceptions to the checkpatch information that we can ignore in general.

For Greg's subsystems ignore the warning about extra parentheses. You can search on lore for if a patch has been patch has been sent before. Otherwise ignore checkpatch if it tells you to do something that makes the code less readable.

regards,
dan carpenter