All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] Fix fbtft/fb_pcd8544.c coding style errors and warnings
@ 2015-01-28 11:16 Heba Aamer
  2015-01-28 11:19 ` [PATCH 1/5] staging: fbtft: fix Macros with complex values should be enclosed in parentheses Heba Aamer
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Heba Aamer @ 2015-01-28 11:16 UTC (permalink / raw)
  To: devel; +Cc: thomas.petazzoni, noralf, gregkh, linux-kernel

This patch set fixes most of the checkpatch.pl coding style
errors and warnings found in drivers/staging/fbtft/fb_pcd8544.c

Regarding the spaces fixes the git diff -w showed no difference,
and the objdiff was empty.

Heba Aamer (5):
  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 horizontal spaces errors
  staging: fbtft: fix trailing whitespace
  staging: fbtft: fix braces {} are not necessary for single statement
    blocks

 drivers/staging/fbtft/fb_pcd8544.c |   17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)

-- 
1.7.9.5


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

* [PATCH 1/5] staging: fbtft: fix Macros with complex values should be enclosed in parentheses
  2015-01-28 11:16 [PATCH 0/5] Fix fbtft/fb_pcd8544.c coding style errors and warnings Heba Aamer
@ 2015-01-28 11:19 ` Heba Aamer
  2015-01-28 19:28   ` Greg KH
  2015-01-28 11:21 ` [PATCH 2/5] staging: fbtft: fix do not initialise statics to 0 or NULL Heba Aamer
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 7+ messages in thread
From: Heba Aamer @ 2015-01-28 11:19 UTC (permalink / raw)
  To: devel; +Cc: thomas.petazzoni, noralf, gregkh, linux-kernel

This patch fixes the following checkpatch.pl error:
fix Macros with complex values should be enclosed in parentheses

Signed-off-by: Heba Aamer <heba93aamer@gmail.com>
---
 drivers/staging/fbtft/fb_pcd8544.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/fbtft/fb_pcd8544.c b/drivers/staging/fbtft/fb_pcd8544.c
index 678ab8e..87ca96e 100644
--- a/drivers/staging/fbtft/fb_pcd8544.c
+++ b/drivers/staging/fbtft/fb_pcd8544.c
@@ -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;
-- 
1.7.9.5


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

* [PATCH 2/5] staging: fbtft: fix do not initialise statics to 0 or NULL
  2015-01-28 11:16 [PATCH 0/5] Fix fbtft/fb_pcd8544.c coding style errors and warnings Heba Aamer
  2015-01-28 11:19 ` [PATCH 1/5] staging: fbtft: fix Macros with complex values should be enclosed in parentheses Heba Aamer
@ 2015-01-28 11:21 ` Heba Aamer
  2015-01-28 11:24 ` [PATCH 3/5] staging: fbtft: fix horizontal spaces errors Heba Aamer
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Heba Aamer @ 2015-01-28 11:21 UTC (permalink / raw)
  To: devel; +Cc: thomas.petazzoni, noralf, gregkh, linux-kernel

This patch fixes the following checkpatch.pl error:
fix do not initialise statics to 0 or NULL

Signed-off-by: Heba Aamer <heba93aamer@gmail.com>
---
 drivers/staging/fbtft/fb_pcd8544.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/fbtft/fb_pcd8544.c b/drivers/staging/fbtft/fb_pcd8544.c
index 87ca96e..d0e5892 100644
--- a/drivers/staging/fbtft/fb_pcd8544.c
+++ b/drivers/staging/fbtft/fb_pcd8544.c
@@ -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)");
 
-- 
1.7.9.5


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

* [PATCH 3/5] staging: fbtft: fix horizontal spaces errors
  2015-01-28 11:16 [PATCH 0/5] Fix fbtft/fb_pcd8544.c coding style errors and warnings Heba Aamer
  2015-01-28 11:19 ` [PATCH 1/5] staging: fbtft: fix Macros with complex values should be enclosed in parentheses Heba Aamer
  2015-01-28 11:21 ` [PATCH 2/5] staging: fbtft: fix do not initialise statics to 0 or NULL Heba Aamer
@ 2015-01-28 11:24 ` Heba Aamer
  2015-01-28 11:26 ` [PATCH 4/5] staging: fbtft: fix trailing whitespace Heba Aamer
  2015-01-28 11:28 ` [PATCH 5/5] staging: fbtft: fix braces {} are not necessary for single statement blocks Heba Aamer
  4 siblings, 0 replies; 7+ messages in thread
From: Heba Aamer @ 2015-01-28 11:24 UTC (permalink / raw)
  To: devel; +Cc: thomas.petazzoni, noralf, gregkh, linux-kernel

This patch fixes the following checkpatch.pl errors:
spaces required around that '='
space required after that ';'
spaces required around that '<'

Signed-off-by: Heba Aamer <heba93aamer@gmail.com>
---
 drivers/staging/fbtft/fb_pcd8544.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/fbtft/fb_pcd8544.c b/drivers/staging/fbtft/fb_pcd8544.c
index d0e5892..0510547 100644
--- a/drivers/staging/fbtft/fb_pcd8544.c
+++ b/drivers/staging/fbtft/fb_pcd8544.c
@@ -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++;
-- 
1.7.9.5


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

* [PATCH 4/5] staging: fbtft: fix trailing whitespace
  2015-01-28 11:16 [PATCH 0/5] Fix fbtft/fb_pcd8544.c coding style errors and warnings Heba Aamer
                   ` (2 preceding siblings ...)
  2015-01-28 11:24 ` [PATCH 3/5] staging: fbtft: fix horizontal spaces errors Heba Aamer
@ 2015-01-28 11:26 ` Heba Aamer
  2015-01-28 11:28 ` [PATCH 5/5] staging: fbtft: fix braces {} are not necessary for single statement blocks Heba Aamer
  4 siblings, 0 replies; 7+ messages in thread
From: Heba Aamer @ 2015-01-28 11:26 UTC (permalink / raw)
  To: devel; +Cc: thomas.petazzoni, noralf, gregkh, linux-kernel

This patch fixes the following checkpatch.pl error:
trailing whitespace

Signed-off-by: Heba Aamer <heba93aamer@gmail.com>
---
 drivers/staging/fbtft/fb_pcd8544.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/fbtft/fb_pcd8544.c b/drivers/staging/fbtft/fb_pcd8544.c
index 0510547..8b9ebfb 100644
--- a/drivers/staging/fbtft/fb_pcd8544.c
+++ b/drivers/staging/fbtft/fb_pcd8544.c
@@ -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
-- 
1.7.9.5


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

* [PATCH 5/5] staging: fbtft: fix braces {} are not necessary for single statement blocks
  2015-01-28 11:16 [PATCH 0/5] Fix fbtft/fb_pcd8544.c coding style errors and warnings Heba Aamer
                   ` (3 preceding siblings ...)
  2015-01-28 11:26 ` [PATCH 4/5] staging: fbtft: fix trailing whitespace Heba Aamer
@ 2015-01-28 11:28 ` Heba Aamer
  4 siblings, 0 replies; 7+ messages in thread
From: Heba Aamer @ 2015-01-28 11:28 UTC (permalink / raw)
  To: devel; +Cc: thomas.petazzoni, noralf, gregkh, linux-kernel

This patch fixes the following checkpatch.pl warning:
braces {} are not necessary for single statement blocks

Signed-off-by: Heba Aamer <heba93aamer@gmail.com>
---
 drivers/staging/fbtft/fb_pcd8544.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/fbtft/fb_pcd8544.c b/drivers/staging/fbtft/fb_pcd8544.c
index 8b9ebfb..5e08a70 100644
--- a/drivers/staging/fbtft/fb_pcd8544.c
+++ b/drivers/staging/fbtft/fb_pcd8544.c
@@ -120,9 +120,8 @@ static int write_vmem(struct fbtft_par *par, size_t offset, size_t len)
 	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++;
 		}
 	}
-- 
1.7.9.5


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

* Re: [PATCH 1/5] staging: fbtft: fix Macros with complex values should be enclosed in parentheses
  2015-01-28 11:19 ` [PATCH 1/5] staging: fbtft: fix Macros with complex values should be enclosed in parentheses Heba Aamer
@ 2015-01-28 19:28   ` Greg KH
  0 siblings, 0 replies; 7+ messages in thread
From: Greg KH @ 2015-01-28 19:28 UTC (permalink / raw)
  To: Heba Aamer; +Cc: devel, noralf, linux-kernel

On Wed, Jan 28, 2015 at 01:19:25PM +0200, Heba Aamer wrote:
> This patch fixes the following checkpatch.pl error:
> fix Macros with complex values should be enclosed in parentheses
> 
> Signed-off-by: Heba Aamer <heba93aamer@gmail.com>
> ---
>  drivers/staging/fbtft/fb_pcd8544.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/fbtft/fb_pcd8544.c b/drivers/staging/fbtft/fb_pcd8544.c
> index 678ab8e..87ca96e 100644
> --- a/drivers/staging/fbtft/fb_pcd8544.c
> +++ b/drivers/staging/fbtft/fb_pcd8544.c
> @@ -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;

This is already in my tree, did you redo this series and not say a 'v2'
in them?

confused,

greg k-h

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

end of thread, other threads:[~2015-01-29  3:26 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-28 11:16 [PATCH 0/5] Fix fbtft/fb_pcd8544.c coding style errors and warnings Heba Aamer
2015-01-28 11:19 ` [PATCH 1/5] staging: fbtft: fix Macros with complex values should be enclosed in parentheses Heba Aamer
2015-01-28 19:28   ` Greg KH
2015-01-28 11:21 ` [PATCH 2/5] staging: fbtft: fix do not initialise statics to 0 or NULL Heba Aamer
2015-01-28 11:24 ` [PATCH 3/5] staging: fbtft: fix horizontal spaces errors Heba Aamer
2015-01-28 11:26 ` [PATCH 4/5] staging: fbtft: fix trailing whitespace Heba Aamer
2015-01-28 11:28 ` [PATCH 5/5] staging: fbtft: fix braces {} are not necessary for single statement blocks Heba Aamer

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.