public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: fbtft: fix alignment should match open parenthesis
@ 2019-04-10 10:00 Himadri Pandya
  2019-04-10 10:42 ` Dan Carpenter
  0 siblings, 1 reply; 6+ messages in thread
From: Himadri Pandya @ 2019-04-10 10:00 UTC (permalink / raw)
  To: gregkh; +Cc: devel, linux-kernel, Himadri Pandya

Fix checkpatch warning "Alignment should match open parenthesis".

Signed-off-by: Himadri Pandya <himadri18.07@gmail.com>
---
 drivers/staging/fbtft/fb_tinylcd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/fbtft/fb_tinylcd.c b/drivers/staging/fbtft/fb_tinylcd.c
index 9469248f2c50..60cda57bcb33 100644
--- a/drivers/staging/fbtft/fb_tinylcd.c
+++ b/drivers/staging/fbtft/fb_tinylcd.c
@@ -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.17.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] staging: fbtft: fix alignment should match open parenthesis
  2019-04-10 10:00 Himadri Pandya
@ 2019-04-10 10:42 ` Dan Carpenter
  2019-04-10 10:50   ` Himadri Pandya
  0 siblings, 1 reply; 6+ messages in thread
From: Dan Carpenter @ 2019-04-10 10:42 UTC (permalink / raw)
  To: Himadri Pandya; +Cc: gregkh, devel, linux-kernel

On Wed, Apr 10, 2019 at 03:30:22PM +0530, Himadri Pandya wrote:
> Fix checkpatch warning "Alignment should match open parenthesis".
> 
> Signed-off-by: Himadri Pandya <himadri18.07@gmail.com>
> ---
>  drivers/staging/fbtft/fb_tinylcd.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/fbtft/fb_tinylcd.c b/drivers/staging/fbtft/fb_tinylcd.c
> index 9469248f2c50..60cda57bcb33 100644
> --- a/drivers/staging/fbtft/fb_tinylcd.c
> +++ b/drivers/staging/fbtft/fb_tinylcd.c
> @@ -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);

The original code was written that way deliberately.  I don't know
why it's broken up like that but it probably means something to people
who have read the hardware spec.  I would leave it as-is.

regards,
dan carpenter


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] staging: fbtft: fix alignment should match open parenthesis
  2019-04-10 10:42 ` Dan Carpenter
@ 2019-04-10 10:50   ` Himadri Pandya
  0 siblings, 0 replies; 6+ messages in thread
From: Himadri Pandya @ 2019-04-10 10:50 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: gregkh, devel, linux-kernel


On 10/04/19 4:12 PM, Dan Carpenter wrote:
> On Wed, Apr 10, 2019 at 03:30:22PM +0530, Himadri Pandya wrote:
>> Fix checkpatch warning "Alignment should match open parenthesis".
>>
>> Signed-off-by: Himadri Pandya <himadri18.07@gmail.com>
>> ---
>>   drivers/staging/fbtft/fb_tinylcd.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/staging/fbtft/fb_tinylcd.c b/drivers/staging/fbtft/fb_tinylcd.c
>> index 9469248f2c50..60cda57bcb33 100644
>> --- a/drivers/staging/fbtft/fb_tinylcd.c
>> +++ b/drivers/staging/fbtft/fb_tinylcd.c
>> @@ -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);
> The original code was written that way deliberately.  I don't know
> why it's broken up like that but it probably means something to people
> who have read the hardware spec.  I would leave it as-is.
>
> regards,
> dan carpenter

Okay. Thank you for reviewing it.

- Himadri


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] staging: fbtft: fix alignment should match open parenthesis
@ 2022-06-26  2:00 David Reaver
  2022-06-26  2:50 ` Joe Perches
  0 siblings, 1 reply; 6+ messages in thread
From: David Reaver @ 2022-06-26  2:00 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: dri-devel, linux-fbdev, linux-staging, linux-kernel, David Reaver

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);

Signed-off-by: David Reaver <me@davidreaver.com>
---
 drivers/staging/fbtft/fb_tinylcd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/fbtft/fb_tinylcd.c b/drivers/staging/fbtft/fb_tinylcd.c
index 9469248f2c50..60cda57bcb33 100644
--- a/drivers/staging/fbtft/fb_tinylcd.c
+++ b/drivers/staging/fbtft/fb_tinylcd.c
@@ -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);

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] staging: fbtft: fix alignment should match open parenthesis
  2022-06-26  2:00 [PATCH] staging: fbtft: fix alignment should match open parenthesis David Reaver
@ 2022-06-26  2:50 ` Joe Perches
  2022-06-26  2:52   ` David Reaver
  0 siblings, 1 reply; 6+ messages in thread
From: Joe Perches @ 2022-06-26  2:50 UTC (permalink / raw)
  To: David Reaver, Greg Kroah-Hartman
  Cc: dri-devel, linux-fbdev, linux-staging, linux-kernel

On Sat, 2022-06-25 at 19:00 -0700, David Reaver wrote:
> Fix alignment of this line of code with the previous parenthesis, as
> suggested by checkpatch.pl:
[]
> diff --git a/drivers/staging/fbtft/fb_tinylcd.c b/drivers/staging/fbtft/fb_tinylcd.c
[]
> @@ -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.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] staging: fbtft: fix alignment should match open parenthesis
  2022-06-26  2:50 ` Joe Perches
@ 2022-06-26  2:52   ` David Reaver
  0 siblings, 0 replies; 6+ messages in thread
From: David Reaver @ 2022-06-26  2:52 UTC (permalink / raw)
  To: Joe Perches
  Cc: Greg Kroah-Hartman, dri-devel, linux-fbdev, linux-staging,
	linux-kernel


Joe Perches <joe@perches.com> writes:

> On Sat, 2022-06-25 at 19:00 -0700, David Reaver wrote:
>> Fix alignment of this line of code with the previous parenthesis, as
>> suggested by checkpatch.pl:
> []
>> diff --git a/drivers/staging/fbtft/fb_tinylcd.c b/drivers/staging/fbtft/fb_tinylcd.c
> []
>> @@ -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.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-06-26  2:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-26  2:00 [PATCH] staging: fbtft: fix alignment should match open parenthesis David Reaver
2022-06-26  2:50 ` Joe Perches
2022-06-26  2:52   ` David Reaver
  -- strict thread matches above, loose matches on Subject: below --
2019-04-10 10:00 Himadri Pandya
2019-04-10 10:42 ` Dan Carpenter
2019-04-10 10:50   ` Himadri Pandya

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox