All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] staging: fbtft: Reformat longer macro definitions
@ 2020-03-12 14:24 Deepak R Varma
  2020-03-12 14:39 ` [Outreachy kernel] " Julia Lawall
  0 siblings, 1 reply; 4+ messages in thread
From: Deepak R Varma @ 2020-03-12 14:24 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: gregkh, daniel.baluta

Multiple macro definitions crossings 80 character line length nakes it
hard to understand. Reformating the these lines makes the code more
readable and easy to understand. Issue flagged by checkpatch script.

Signed-off-by: Deepak R Varma <mh12gx2825@gmail.com>

Changes in V2:
	- Update patch short description to avoid confution with an earlier patch
description.
---
 drivers/staging/fbtft/fbtft.h | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/fbtft/fbtft.h b/drivers/staging/fbtft/fbtft.h
index 5f782da51959..81da30f4062e 100644
--- a/drivers/staging/fbtft/fbtft.h
+++ b/drivers/staging/fbtft/fbtft.h
@@ -348,9 +348,17 @@ module_exit(fbtft_driver_module_exit);
 
 /* shorthand debug levels */
 #define DEBUG_LEVEL_1	DEBUG_REQUEST_GPIOS
-#define DEBUG_LEVEL_2	(DEBUG_LEVEL_1 | DEBUG_DRIVER_INIT_FUNCTIONS | DEBUG_TIME_FIRST_UPDATE)
-#define DEBUG_LEVEL_3	(DEBUG_LEVEL_2 | DEBUG_RESET | DEBUG_INIT_DISPLAY | DEBUG_BLANK | DEBUG_REQUEST_GPIOS | DEBUG_FREE_GPIOS | DEBUG_VERIFY_GPIOS | DEBUG_BACKLIGHT | DEBUG_SYSFS)
-#define DEBUG_LEVEL_4	(DEBUG_LEVEL_2 | DEBUG_FB_READ | DEBUG_FB_WRITE | DEBUG_FB_FILLRECT | DEBUG_FB_COPYAREA | DEBUG_FB_IMAGEBLIT | DEBUG_FB_BLANK)
+#define DEBUG_LEVEL_2	(DEBUG_LEVEL_1 | DEBUG_DRIVER_INIT_FUNCTIONS        \
+				       | DEBUG_TIME_FIRST_UPDATE)
+#define DEBUG_LEVEL_3	(DEBUG_LEVEL_2 | DEBUG_RESET | DEBUG_INIT_DISPLAY   \
+				       | DEBUG_BLANK | DEBUG_REQUEST_GPIOS  \
+				       | DEBUG_FREE_GPIOS                   \
+				       | DEBUG_VERIFY_GPIOS                 \
+				       | DEBUG_BACKLIGHT | DEBUG_SYSFS)
+#define DEBUG_LEVEL_4	(DEBUG_LEVEL_2 | DEBUG_FB_READ | DEBUG_FB_WRITE     \
+				       | DEBUG_FB_FILLRECT                  \
+				       | DEBUG_FB_COPYAREA                  \
+				       | DEBUG_FB_IMAGEBLIT | DEBUG_FB_BLANK)
 #define DEBUG_LEVEL_5	(DEBUG_LEVEL_3 | DEBUG_UPDATE_DISPLAY)
 #define DEBUG_LEVEL_6	(DEBUG_LEVEL_4 | DEBUG_LEVEL_5)
 #define DEBUG_LEVEL_7	0xFFFFFFFF
-- 
2.17.1



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

* Re: [Outreachy kernel] [PATCH v2] staging: fbtft: Reformat longer macro definitions
  2020-03-12 14:24 [PATCH v2] staging: fbtft: Reformat longer macro definitions Deepak R Varma
@ 2020-03-12 14:39 ` Julia Lawall
  2020-03-12 16:32   ` Deepak Varma
  0 siblings, 1 reply; 4+ messages in thread
From: Julia Lawall @ 2020-03-12 14:39 UTC (permalink / raw)
  To: Deepak R Varma; +Cc: outreachy-kernel, gregkh, daniel.baluta



On Thu, 12 Mar 2020, Deepak R Varma wrote:

> Multiple macro definitions crossings 80 character line length nakes it
> hard to understand. Reformating the these lines makes the code more
> readable and easy to understand. Issue flagged by checkpatch script.
>
> Signed-off-by: Deepak R Varma <mh12gx2825@gmail.com>
>
> Changes in V2:
> 	- Update patch short description to avoid confution with an earlier patch
> description.

Thsi information goes below the --- so that it will be dropped when the
patch is applied.  When someone looks through the git history they will
have no idea what "and earlier patch description" refers to.

julia

> ---
>  drivers/staging/fbtft/fbtft.h | 14 +++++++++++---
>  1 file changed, 11 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/staging/fbtft/fbtft.h b/drivers/staging/fbtft/fbtft.h
> index 5f782da51959..81da30f4062e 100644
> --- a/drivers/staging/fbtft/fbtft.h
> +++ b/drivers/staging/fbtft/fbtft.h
> @@ -348,9 +348,17 @@ module_exit(fbtft_driver_module_exit);
>
>  /* shorthand debug levels */
>  #define DEBUG_LEVEL_1	DEBUG_REQUEST_GPIOS
> -#define DEBUG_LEVEL_2	(DEBUG_LEVEL_1 | DEBUG_DRIVER_INIT_FUNCTIONS | DEBUG_TIME_FIRST_UPDATE)
> -#define DEBUG_LEVEL_3	(DEBUG_LEVEL_2 | DEBUG_RESET | DEBUG_INIT_DISPLAY | DEBUG_BLANK | DEBUG_REQUEST_GPIOS | DEBUG_FREE_GPIOS | DEBUG_VERIFY_GPIOS | DEBUG_BACKLIGHT | DEBUG_SYSFS)
> -#define DEBUG_LEVEL_4	(DEBUG_LEVEL_2 | DEBUG_FB_READ | DEBUG_FB_WRITE | DEBUG_FB_FILLRECT | DEBUG_FB_COPYAREA | DEBUG_FB_IMAGEBLIT | DEBUG_FB_BLANK)
> +#define DEBUG_LEVEL_2	(DEBUG_LEVEL_1 | DEBUG_DRIVER_INIT_FUNCTIONS        \
> +				       | DEBUG_TIME_FIRST_UPDATE)
> +#define DEBUG_LEVEL_3	(DEBUG_LEVEL_2 | DEBUG_RESET | DEBUG_INIT_DISPLAY   \
> +				       | DEBUG_BLANK | DEBUG_REQUEST_GPIOS  \
> +				       | DEBUG_FREE_GPIOS                   \
> +				       | DEBUG_VERIFY_GPIOS                 \
> +				       | DEBUG_BACKLIGHT | DEBUG_SYSFS)
> +#define DEBUG_LEVEL_4	(DEBUG_LEVEL_2 | DEBUG_FB_READ | DEBUG_FB_WRITE     \
> +				       | DEBUG_FB_FILLRECT                  \
> +				       | DEBUG_FB_COPYAREA                  \
> +				       | DEBUG_FB_IMAGEBLIT | DEBUG_FB_BLANK)
>  #define DEBUG_LEVEL_5	(DEBUG_LEVEL_3 | DEBUG_UPDATE_DISPLAY)
>  #define DEBUG_LEVEL_6	(DEBUG_LEVEL_4 | DEBUG_LEVEL_5)
>  #define DEBUG_LEVEL_7	0xFFFFFFFF
> --
> 2.17.1
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20200312142357.GA29468%40deeUbuntu.
>


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

* Re: [Outreachy kernel] [PATCH v2] staging: fbtft: Reformat longer macro definitions
  2020-03-12 14:39 ` [Outreachy kernel] " Julia Lawall
@ 2020-03-12 16:32   ` Deepak Varma
  2020-03-12 19:00     ` Stefano Brivio
  0 siblings, 1 reply; 4+ messages in thread
From: Deepak Varma @ 2020-03-12 16:32 UTC (permalink / raw)
  To: outreachy-kernel


[-- Attachment #1.1: Type: text/plain, Size: 3451 bytes --]



On Thursday, 12 March 2020 20:10:04 UTC+5:30, Julia Lawall wrote:
>
>
>
> On Thu, 12 Mar 2020, Deepak R Varma wrote: 
>
> > Multiple macro definitions crossings 80 character line length nakes it 
> > hard to understand. Reformating the these lines makes the code more 
> > readable and easy to understand. Issue flagged by checkpatch script. 
> > 
> > Signed-off-by: Deepak R Varma <mh12g...@gmail.com <javascript:>> 
> > 
> > Changes in V2: 
> >         - Update patch short description to avoid confution with an 
> earlier patch 
> > description. 
>
> Thsi information goes below the --- so that it will be dropped when the 
> patch is applied.  When someone looks through the git history they will 
> have no idea what "and earlier patch description" refers to. 
>
> julia 
>

Is this done at the time of "commit --amend" or should this be added in the 
email template manually before sending the patch?

Deepak.

>
> > --- 
> >  drivers/staging/fbtft/fbtft.h | 14 +++++++++++--- 
> >  1 file changed, 11 insertions(+), 3 deletions(-) 
> > 
> > diff --git a/drivers/staging/fbtft/fbtft.h 
> b/drivers/staging/fbtft/fbtft.h 
> > index 5f782da51959..81da30f4062e 100644 
> > --- a/drivers/staging/fbtft/fbtft.h 
> > +++ b/drivers/staging/fbtft/fbtft.h 
> > @@ -348,9 +348,17 @@ module_exit(fbtft_driver_module_exit); 
> > 
> >  /* shorthand debug levels */ 
> >  #define DEBUG_LEVEL_1        DEBUG_REQUEST_GPIOS 
> > -#define DEBUG_LEVEL_2        (DEBUG_LEVEL_1 | 
> DEBUG_DRIVER_INIT_FUNCTIONS | DEBUG_TIME_FIRST_UPDATE) 
> > -#define DEBUG_LEVEL_3        (DEBUG_LEVEL_2 | DEBUG_RESET | 
> DEBUG_INIT_DISPLAY | DEBUG_BLANK | DEBUG_REQUEST_GPIOS | DEBUG_FREE_GPIOS | 
> DEBUG_VERIFY_GPIOS | DEBUG_BACKLIGHT | DEBUG_SYSFS) 
> > -#define DEBUG_LEVEL_4        (DEBUG_LEVEL_2 | DEBUG_FB_READ | 
> DEBUG_FB_WRITE | DEBUG_FB_FILLRECT | DEBUG_FB_COPYAREA | DEBUG_FB_IMAGEBLIT 
> | DEBUG_FB_BLANK) 
> > +#define DEBUG_LEVEL_2        (DEBUG_LEVEL_1 | 
> DEBUG_DRIVER_INIT_FUNCTIONS        \ 
> > +                                       | DEBUG_TIME_FIRST_UPDATE) 
> > +#define DEBUG_LEVEL_3        (DEBUG_LEVEL_2 | DEBUG_RESET | 
> DEBUG_INIT_DISPLAY   \ 
> > +                                       | DEBUG_BLANK | 
> DEBUG_REQUEST_GPIOS  \ 
> > +                                       | DEBUG_FREE_GPIOS               
>     \ 
> > +                                       | DEBUG_VERIFY_GPIOS             
>     \ 
> > +                                       | DEBUG_BACKLIGHT | DEBUG_SYSFS) 
> > +#define DEBUG_LEVEL_4        (DEBUG_LEVEL_2 | DEBUG_FB_READ | 
> DEBUG_FB_WRITE     \ 
> > +                                       | DEBUG_FB_FILLRECT             
>      \ 
> > +                                       | DEBUG_FB_COPYAREA             
>      \ 
> > +                                       | DEBUG_FB_IMAGEBLIT | 
> DEBUG_FB_BLANK) 
> >  #define DEBUG_LEVEL_5        (DEBUG_LEVEL_3 | DEBUG_UPDATE_DISPLAY) 
> >  #define DEBUG_LEVEL_6        (DEBUG_LEVEL_4 | DEBUG_LEVEL_5) 
> >  #define DEBUG_LEVEL_7        0xFFFFFFFF 
> > -- 
> > 2.17.1 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> Groups "outreachy-kernel" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> an email to outreach...@googlegroups.com <javascript:>. 
> > To view this discussion on the web visit 
> https://groups.google.com/d/msgid/outreachy-kernel/20200312142357.GA29468%40deeUbuntu. 
>
> > 
>

[-- Attachment #1.2: Type: text/html, Size: 5356 bytes --]

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

* Re: [Outreachy kernel] [PATCH v2] staging: fbtft: Reformat longer macro definitions
  2020-03-12 16:32   ` Deepak Varma
@ 2020-03-12 19:00     ` Stefano Brivio
  0 siblings, 0 replies; 4+ messages in thread
From: Stefano Brivio @ 2020-03-12 19:00 UTC (permalink / raw)
  To: Deepak Varma; +Cc: outreachy-kernel

On Thu, 12 Mar 2020 09:32:52 -0700 (PDT)
Deepak Varma <mh12gx2825@gmail.com> wrote:

> On Thursday, 12 March 2020 20:10:04 UTC+5:30, Julia Lawall wrote:
> >
> > Thsi information goes below the --- so that it will be dropped when the 
> > patch is applied.  When someone looks through the git history they will 
> > have no idea what "and earlier patch description" refers to. 
> >
> > julia 
> >  
> 
> Is this done at the time of "commit --amend" or should this be added in the 
> email template manually before sending the patch?

I typically do it "manually" after git format-patch (especially because
for networking patches we write non-trivial stuff before ---, and
trivial stuff such as "new patch in series" or "no changes" after ---).

I just got to know about the --notes option of git format-patch, I
guess you could also check that out.

-- 
Stefano



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

end of thread, other threads:[~2020-03-12 19:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-12 14:24 [PATCH v2] staging: fbtft: Reformat longer macro definitions Deepak R Varma
2020-03-12 14:39 ` [Outreachy kernel] " Julia Lawall
2020-03-12 16:32   ` Deepak Varma
2020-03-12 19:00     ` Stefano Brivio

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.