Fix fbtft/fb_pcd8544.c coding style errors
Subsystems (2)
cover Fix fbtft/fb_pcd8544.c coding style errors
This patch set fixes most of the checkpatch.pl coding style errors found in drivers/staging/fbtft/fb_pcd8544.c
Heba Aamer (6):
staging: fbtft: fix space required after that ';'
staging: fbtft: fix spaces required around that '='
staging: fbtft: fix spaces required around that '<'
staging: fbtft: fix Macros with complex values should be enclosed in
parentheses
staging: fbtft: fix do not initialise statics to 0 or NULL
staging: fbtft: fix trailing whitespace
drivers/staging/fbtft/fb_pcd8544.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
Signature · 1 line
1.7.9.5
PATCH 1/6 staging: fbtft: fix space required after that ';'
This patch fixes the following checkpatch.pl error:
fix space required after that ';'
--- drivers/staging/fbtft/fb_pcd8544.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/fbtft/fb_pcd8544.c +3 -3
@@ -117,10 +117,10 @@ static int write_vmem(struct fbtft_par *par, size_t offset, size_t len)fbtft_par_dbg (DEBUG_WRITE_VMEM , par,"%s()\n" , __func__); -for (x=0 ;x<84 ;x++) { -for (y=0 ;y<6 ;y++) { +for (x=0 ; x<84 ; x++) { +for (y=0 ; y<6 ; y++) { *buf =0x00 ; -for (i=0 ;i<8 ;i++) { +for (i=0 ; i<8 ; i++) { *buf |= (vmem16[(y*8 +i)*84 +x] ?1 :0 ) << i; } buf++;
Signature · 1 line
1.7.9.5
PATCH 2/6 staging: fbtft: fix spaces required around that '='
In reply to Heba AamerThis patch fixes the following checkpatch.pl error:
fix spaces required around that '='
--- drivers/staging/fbtft/fb_pcd8544.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/fbtft/fb_pcd8544.c +3 -3
@@ -117,10 +117,10 @@ static int write_vmem(struct fbtft_par *par, size_t offset, size_t len)fbtft_par_dbg (DEBUG_WRITE_VMEM , par,"%s()\n" , __func__); -for (x=0 ; x<84 ; x++) { -for (y=0 ; y<6 ; y++) { +for (x =0 ; x<84 ; x++) { +for (y =0 ; y<6 ; y++) { *buf =0x00 ; -for (i=0 ; i<8 ; i++) { +for (i =0 ; i<8 ; i++) { *buf |= (vmem16[(y*8 +i)*84 +x] ?1 :0 ) << i; } buf++;
Signature · 1 line
1.7.9.5
PATCH 3/6 staging: fbtft: fix spaces required around that '<'
In reply to Heba AamerThis patch fixes the following checkpatch.pl error:
fix spaces required around that '<'
--- drivers/staging/fbtft/fb_pcd8544.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/fbtft/fb_pcd8544.c +3 -3
@@ -117,10 +117,10 @@ static int write_vmem(struct fbtft_par *par, size_t offset, size_t len)fbtft_par_dbg (DEBUG_WRITE_VMEM , par,"%s()\n" , __func__); -for (x =0 ; x<84 ; x++) { -for (y =0 ; y<6 ; y++) { +for (x =0 ; x <84 ; x++) { +for (y =0 ; y <6 ; y++) { *buf =0x00 ; -for (i =0 ; i<8 ; i++) { +for (i =0 ; i <8 ; i++) { *buf |= (vmem16[(y*8 +i)*84 +x] ?1 :0 ) << i; } buf++;
Signature · 1 line
1.7.9.5
PATCH 4/6 staging: fbtft: fix Macros with complex values should be enclosed in parentheses
In reply to Heba AamerThis patch fixes the following checkpatch.pl error:
fix Macros with complex values should be enclosed in parentheses
--- drivers/staging/fbtft/fb_pcd8544.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/fbtft/fb_pcd8544.c +1 -1
@@ -33,7 +33,7 @@#define DRVNAME "fb_pcd8544"#define WIDTH 84#define HEIGHT 48 -#define TXBUFLEN 84*6 +#define TXBUFLEN (84*6)#define DEFAULT_GAMMA "40"/* gamma is used to control contrast in this driver */ static unsigned tc =0 ;
Signature · 1 line
1.7.9.5
PATCH 5/6 staging: fbtft: fix do not initialise statics to 0 or NULL
In reply to Heba AamerThis patch fixes the following checkpatch.pl error:
fix do not initialise statics to 0 or NULL
--- drivers/staging/fbtft/fb_pcd8544.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/fbtft/fb_pcd8544.c +1 -1
@@ -36,7 +36,7 @@#define TXBUFLEN (84*6)#define DEFAULT_GAMMA "40"/* gamma is used to control contrast in this driver */ -static unsigned tc =0 ; +static unsigned tc;module_param (tc, uint,0 );MODULE_PARM_DESC (tc,"TC[1:0] Temperature coefficient: 0-3 (default: 0)" );
Signature · 1 line
1.7.9.5
PATCH 6/6 staging: fbtft: fix trailing whitespace
In reply to Heba AamerThis patch fixes the following checkpatch.pl error:
fix trailing whitespace
--- drivers/staging/fbtft/fb_pcd8544.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/fbtft/fb_pcd8544.c +3 -3
@@ -59,14 +59,14 @@ static int init_display(struct fbtft_par *par)*/ /* H=1 Temperature control */ -write_reg (par,0x04 | (tc &0x3 ));/* +write_reg (par,0x04 | (tc &0x3 ));/* 2:1 1 1:x TC1 - Temperature Coefficient: 0x10 0:x TC0 */ /* H=1 Bias system */ -write_reg (par,0x10 | (bs &0x7 ));/* +write_reg (par,0x10 | (bs &0x7 ));/* 4:1 1 3:0 0 2:x BS2 - Bias System
@@ -82,7 +82,7 @@ static int init_display(struct fbtft_par *par)*/ /* H=0 Display control */ -write_reg (par,0x08 |4 );/* +write_reg (par,0x08 |4 );/* 3:1 1 2:1 D - DE: 10=normal mode 1:0 0
Signature · 1 line
1.7.9.5
Quoted 7 lines · Heba Aamer
This patch set fixes most of the checkpatch.pl coding style errors found in
drivers/staging/fbtft/fb_pcd8544.cHeba Aamer (6):
staging: fbtft: fix space required after that ';'
staging: fbtft: fix spaces required around that '='
staging: fbtft: fix spaces required around that '<'
I suppose this is OK, but I think it's better to do all the horizontal whitespace changes in the same patch.
It's trivial and easy to verify all-at-once instead of modifying the same line multiple times.
It's also nice to say that git diff -w shows no difference and that objdiff is empty.
Quoted 1 line
staging: fbtft: fix trailing whitespace