Skip to contentSkip to conversation

staging: fbtft: fix alignment should match open parenthesis

PATCH In review David Reaver 2 participants 3 messages Jun 26, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: fbtft: fix alignment should match open parenthesis

Fix alignment of this line of code with the previous parenthesis, as suggested by checkpatch.pl:

  $ ./scripts/checkpatch.pl -f drivers/staging/fbtft/fb_tinylcd.c
  CHECK: Alignment should match open parenthesis
  #41: FILE: drivers/staging/fbtft/fb_tinylcd.c:41:
  +       write_reg(par, 0xE0, 0x00, 0x35, 0x33, 0x00, 0x00, 0x00,
  +                      0x00, 0x35, 0x33, 0x00, 0x00, 0x00);
---
 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);
#1 lore raw
Quoted 2 lines · David Reaver

Fix alignment of this line of code with the previous parenthesis, as suggested by checkpatch.pl:

[]

drivers/staging/fbtft/fb_tinylcd.c

Quoted 1 line
drivers/staging/fbtft/fb_tinylcd.c +0 -0

[]

drivers/staging/fbtft/fb_tinylcd.c static int init_display(struct fbtft_par *par) · line 41

Quoted 6 lines
drivers/staging/fbtft/fb_tinylcd.c +1 -1
@@ -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);

It's probably better to ignore the message in this case as the first argument means something and the second and subsequent are the data being written via a specific macro using NUMARGS.

#2 lore raw
Quoted 6 lines · Joe Perches
Quoted 2 lines · David Reaver

Fix alignment of this line of code with the previous parenthesis, as suggested by checkpatch.pl:

[]

drivers/staging/fbtft/fb_tinylcd.c

Quoted 1 line
drivers/staging/fbtft/fb_tinylcd.c +0 -0

[]

Quoted 10 lines

drivers/staging/fbtft/fb_tinylcd.c static int init_display(struct fbtft_par *par) · line 41

Quoted 6 lines
drivers/staging/fbtft/fb_tinylcd.c +1 -1
@@ -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);

It's probably better to ignore the message in this case as the first argument means something and the second and subsequent are the data being written via a specific macro using NUMARGS.

Thanks for taking a look Joe! That makes sense. I'm new to the kernel and running checkpath.pl on staging drivers was suggested as a good place to start contributing, but I'll keep a more careful eye out next time and not follow checkpath blindly.