* [PATCH 1/6] staging: fbtft: fix space required after that ';'
2015-01-27 20:30 [PATCH 0/6] Fix fbtft/fb_pcd8544.c coding style errors Heba Aamer
@ 2015-01-27 20:33 ` Heba Aamer
2015-01-27 20:35 ` [PATCH 2/6] staging: fbtft: fix spaces required around that '=' Heba Aamer
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Heba Aamer @ 2015-01-27 20:33 UTC (permalink / raw)
To: devel; +Cc: gregkh, notro, thomas.petazzoni, linux-kernel
This patch fixes the following checkpatch.pl error:
fix space required after 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 678ab8e..387190d 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] 8+ messages in thread
* [PATCH 2/6] staging: fbtft: fix spaces required around that '='
2015-01-27 20:30 [PATCH 0/6] Fix fbtft/fb_pcd8544.c coding style errors Heba Aamer
2015-01-27 20:33 ` [PATCH 1/6] staging: fbtft: fix space required after that ';' Heba Aamer
@ 2015-01-27 20:35 ` Heba Aamer
2015-01-27 20:37 ` [PATCH 3/6] staging: fbtft: fix spaces required around that '<' Heba Aamer
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Heba Aamer @ 2015-01-27 20:35 UTC (permalink / raw)
To: devel; +Cc: gregkh, notro, thomas.petazzoni, linux-kernel
This patch fixes the following checkpatch.pl error:
fix 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 387190d..ed0922d 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] 8+ messages in thread
* [PATCH 3/6] staging: fbtft: fix spaces required around that '<'
2015-01-27 20:30 [PATCH 0/6] Fix fbtft/fb_pcd8544.c coding style errors Heba Aamer
2015-01-27 20:33 ` [PATCH 1/6] staging: fbtft: fix space required after that ';' Heba Aamer
2015-01-27 20:35 ` [PATCH 2/6] staging: fbtft: fix spaces required around that '=' Heba Aamer
@ 2015-01-27 20:37 ` Heba Aamer
2015-01-27 20:39 ` [PATCH 4/6] staging: fbtft: fix Macros with complex values should be enclosed in parentheses Heba Aamer
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Heba Aamer @ 2015-01-27 20:37 UTC (permalink / raw)
To: devel; +Cc: gregkh, notro, thomas.petazzoni, linux-kernel
This patch fixes the following checkpatch.pl error:
fix 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 ed0922d..dd72bed 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] 8+ messages in thread
* [PATCH 4/6] staging: fbtft: fix Macros with complex values should be enclosed in parentheses
2015-01-27 20:30 [PATCH 0/6] Fix fbtft/fb_pcd8544.c coding style errors Heba Aamer
` (2 preceding siblings ...)
2015-01-27 20:37 ` [PATCH 3/6] staging: fbtft: fix spaces required around that '<' Heba Aamer
@ 2015-01-27 20:39 ` Heba Aamer
2015-01-27 20:42 ` [PATCH 5/6] staging: fbtft: fix do not initialise statics to 0 or NULL Heba Aamer
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Heba Aamer @ 2015-01-27 20:39 UTC (permalink / raw)
To: devel; +Cc: gregkh, notro, thomas.petazzoni, 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 dd72bed..d20d432 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] 8+ messages in thread
* [PATCH 5/6] staging: fbtft: fix do not initialise statics to 0 or NULL
2015-01-27 20:30 [PATCH 0/6] Fix fbtft/fb_pcd8544.c coding style errors Heba Aamer
` (3 preceding siblings ...)
2015-01-27 20:39 ` [PATCH 4/6] staging: fbtft: fix Macros with complex values should be enclosed in parentheses Heba Aamer
@ 2015-01-27 20:42 ` Heba Aamer
2015-01-27 20:46 ` [PATCH 6/6] staging: fbtft: fix trailing whitespace Heba Aamer
2015-01-27 20:47 ` [PATCH 0/6] Fix fbtft/fb_pcd8544.c coding style errors Joe Perches
6 siblings, 0 replies; 8+ messages in thread
From: Heba Aamer @ 2015-01-27 20:42 UTC (permalink / raw)
To: devel; +Cc: gregkh, notro, thomas.petazzoni, 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 d20d432..0510547 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] 8+ messages in thread
* [PATCH 6/6] staging: fbtft: fix trailing whitespace
2015-01-27 20:30 [PATCH 0/6] Fix fbtft/fb_pcd8544.c coding style errors Heba Aamer
` (4 preceding siblings ...)
2015-01-27 20:42 ` [PATCH 5/6] staging: fbtft: fix do not initialise statics to 0 or NULL Heba Aamer
@ 2015-01-27 20:46 ` Heba Aamer
2015-01-27 20:47 ` [PATCH 0/6] Fix fbtft/fb_pcd8544.c coding style errors Joe Perches
6 siblings, 0 replies; 8+ messages in thread
From: Heba Aamer @ 2015-01-27 20:46 UTC (permalink / raw)
To: devel; +Cc: gregkh, notro, thomas.petazzoni, linux-kernel
This patch fixes the following checkpatch.pl error:
fix 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] 8+ messages in thread
* Re: [PATCH 0/6] Fix fbtft/fb_pcd8544.c coding style errors
2015-01-27 20:30 [PATCH 0/6] Fix fbtft/fb_pcd8544.c coding style errors Heba Aamer
` (5 preceding siblings ...)
2015-01-27 20:46 ` [PATCH 6/6] staging: fbtft: fix trailing whitespace Heba Aamer
@ 2015-01-27 20:47 ` Joe Perches
6 siblings, 0 replies; 8+ messages in thread
From: Joe Perches @ 2015-01-27 20:47 UTC (permalink / raw)
To: Heba Aamer; +Cc: devel, gregkh, notro, thomas.petazzoni, linux-kernel
On Tue, 2015-01-27 at 22:30 +0200, Heba Aamer wrote:
> 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 '<'
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.
> staging: fbtft: fix trailing whitespace
^ permalink raw reply [flat|nested] 8+ messages in thread