Skip to contentSkip to conversation

staging: fbtft: Reformat longer macro definitions

PATCH In review Deepak R Varma 3 participants 4 messages Mar 12, 2020

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

PATCH v2 1/1 staging: fbtft: Reformat longer macro definitions

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.

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(-)
drivers/staging/fbtft/fbtft.h +11 -3
index 5f782da51959..81da30f4062e 100644
@@ -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
Signature · 1 line
2.17.1
#1 lore raw
Quoted 9 lines · Deepak R Varma

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.

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

Quoted 37 lines
---
 drivers/staging/fbtft/fbtft.h | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)
drivers/staging/fbtft/fbtft.h +11 -4
index 5f782da51959..81da30f4062e 100644
@@ -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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20200312142357.GA29468%40deeUbuntu.

#2 lore raw
Quoted 13 lines · Julia Lawall
Quoted 8 lines · Deepak R Varma

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 <[email protected] <javascript:>>

Changes in V2:
- Update patch short description to avoid confution with an

Quoted 9 lines

earlier patch

Quoted 1 line

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.

Quoted 58 lines

Review

Quoted 6 lines

---

 drivers/staging/fbtft/fbtft.h | 14 +++++++++++--- 
 1 file changed, 11 insertions(+), 3 deletions(-) 
(quoted diff) +0 -0

b/drivers/staging/fbtft/fbtft.h

drivers/staging/fbtft/fbtft.h module_exit(fbtft_driver_module_exit); · line 351

Quoted 8 lines

index 5f782da51959..81da30f4062e 100644

drivers/staging/fbtft/fbtft.h +0 -1
@@ -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)

drivers/staging/fbtft/fbtft.h module_exit(fbtft_driver_module_exit); · line 352

Quoted 1 line
drivers/staging/fbtft/fbtft.h +0 -1
-#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)

drivers/staging/fbtft/fbtft.h module_exit(fbtft_driver_module_exit); · line 353

Quoted 1 line
drivers/staging/fbtft/fbtft.h +0 -1
-#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)

drivers/staging/fbtft/fbtft.h module_exit(fbtft_driver_module_exit); · line 351

Quoted 1 line
drivers/staging/fbtft/fbtft.h +1 -0
+#define DEBUG_LEVEL_2        (DEBUG_LEVEL_1 | 

DEBUG_DRIVER_INIT_FUNCTIONS \

drivers/staging/fbtft/fbtft.h module_exit(fbtft_driver_module_exit); · line 353

Quoted 2 lines
drivers/staging/fbtft/fbtft.h +2 -0
+                                       | DEBUG_TIME_FIRST_UPDATE) 
+#define DEBUG_LEVEL_3        (DEBUG_LEVEL_2 | DEBUG_RESET | 

DEBUG_INIT_DISPLAY \

drivers/staging/fbtft/fbtft.h module_exit(fbtft_driver_module_exit); · line 354

Quoted 1 line
drivers/staging/fbtft/fbtft.h +1 -0
+                                       | DEBUG_BLANK | 

DEBUG_REQUEST_GPIOS \

drivers/staging/fbtft/fbtft.h module_exit(fbtft_driver_module_exit); · line 355

Quoted 1 line
drivers/staging/fbtft/fbtft.h +1 -0
+                                       | DEBUG_FREE_GPIOS               
    \ 

drivers/staging/fbtft/fbtft.h module_exit(fbtft_driver_module_exit); · line 356

Quoted 1 line
drivers/staging/fbtft/fbtft.h +1 -0
+                                       | DEBUG_VERIFY_GPIOS             
    \ 

drivers/staging/fbtft/fbtft.h module_exit(fbtft_driver_module_exit); · line 358

Quoted 2 lines
drivers/staging/fbtft/fbtft.h +2 -0
+                                       | DEBUG_BACKLIGHT | DEBUG_SYSFS) 
+#define DEBUG_LEVEL_4        (DEBUG_LEVEL_2 | DEBUG_FB_READ | 

DEBUG_FB_WRITE \

drivers/staging/fbtft/fbtft.h module_exit(fbtft_driver_module_exit); · line 359

Quoted 1 line
drivers/staging/fbtft/fbtft.h +1 -0
+                                       | DEBUG_FB_FILLRECT             
     \ 

drivers/staging/fbtft/fbtft.h module_exit(fbtft_driver_module_exit); · line 360

Quoted 1 line
drivers/staging/fbtft/fbtft.h +1 -0
+                                       | DEBUG_FB_COPYAREA             
     \ 

drivers/staging/fbtft/fbtft.h module_exit(fbtft_driver_module_exit); · line 361

Quoted 1 line
drivers/staging/fbtft/fbtft.h +1 -0
+                                       | DEBUG_FB_IMAGEBLIT | 

DEBUG_FB_BLANK)

Quoted 8 lines
drivers/staging/fbtft/fbtft.h +0 -0
 #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 
Signature · 4 lines
2.17.1 

-- 
You received this message because you are subscribed to the Google 

Groups "outreachy-kernel" group.

Quoted 1 line

To unsubscribe from this group and stop receiving emails from it, send

an email to [email protected] <javascript:>.

Quoted 1 line

To view this discussion on the web visit

https://groups.google.com/d/msgid/outreachy-kernel/20200312142357.GA29468%40deeUbuntu.

Quoted 1 line
#3 lore raw
Quoted 11 lines · On Thu, 12 Mar 2020 09:32:52 -0700 (PDT) Deepak Varma <[email protected]>…
Quoted 7 lines · Julia Lawall

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.

Signature · 1 line
Stefano