Skip to contentSkip to conversation

Staging: panel: Fix checkpatch warnings

PATCH Superseded Ksenija Stanojevic 2 participants 6 messages Dec 27, 2015 – Dec 30, 2015 Staging

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover Staging: panel: Fix checkpatch warnings

Fix checkpatch.pl warnings in panel.c

Ksenija Stanojevic (2):
Staging: panel: Fix line over 80 characters
Staging: panel: Remove space

 drivers/staging/panel/panel.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/2 Staging: panel: Fix line over 80 characters

Split comment in order to fit into 80 characters per line. Found by checkpatch.pl

---
 drivers/staging/panel/panel.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/staging/panel/panel.c +3 -1
index 79ac192..7171c5d 100644
@@ -947,7 +947,9 @@ static void lcd_clear_fast_s(void)
 		lcd_send_serial(0x5F);	/* R/W=W, RS=1 */
 		lcd_send_serial(' ' & 0x0F);
 		lcd_send_serial((' ' >> 4) & 0x0F);
-		usleep_range(40, 100);	/* the shortest data takes at least 40 us */
+		usleep_range(40, 100);	/* the shortest data
+					 * takes at least 40 us
+					 */
 	}
 	spin_unlock_irq(&pprt_lock);
 
Signature · 1 line
1.9.1
#2 lore raw

Re: [PATCH 1/2] Staging: panel: Fix line over 80 characters

Quoted 5 lines · Ksenija Stanojevic

Split comment in order to fit into 80 characters per line. Found by checkpatch.pl

---

Instead of multiline maybe this is better:

drivers/staging/panel/panel.c +2 -1
index 79ac192..3525919 100644
@@ -947,7 +947,8 @@ static void lcd_clear_fast_s(void)
 		lcd_send_serial(0x5F);	/* R/W=W, RS=1 */
 		lcd_send_serial(' ' & 0x0F);
 		lcd_send_serial((' ' >> 4) & 0x0F);
-		usleep_range(40, 100);	/* the shortest data takes at least 40 us */
+		/* the shortest data takes at least 40 us */
+		usleep_range(40, 100);
 	}
 	spin_unlock_irq(&pprt_lock);
 

regards
sudip

#3 lore raw

Re: [PATCH 1/2] Staging: panel: Fix line over 80 characters

Quoted 14 lines · Sudip Mukherjee
Quoted 5 lines · Ksenija Stanojevic

Split comment in order to fit into 80 characters per line. Found by checkpatch.pl

---

Instead of multiline maybe this is better:

drivers/staging/panel/panel.c +0 -0
index 79ac192..3525919 100644

drivers/staging/panel/panel.c static void lcd_clear_fast_s(void) · line 953

Quoted 8 lines
drivers/staging/panel/panel.c +2 -1
@@ -947,7 +947,8 @@ static void lcd_clear_fast_s(void)
                lcd_send_serial(0x5F);  /* R/W=W, RS=1 */
                lcd_send_serial(' ' & 0x0F);
                lcd_send_serial((' ' >> 4) & 0x0F);
-               usleep_range(40, 100);  /* the shortest data takes at least 40 us */
+               /* the shortest data takes at least 40 us */
+               usleep_range(40, 100);
        }
        spin_unlock_irq(&pprt_lock);

It's already been done by Bijosh Thykkoottathil:
https://lkml.org/lkml/2015/12/18/681

Regards,
Ksenija

#4 lore raw

Re: [PATCH 1/2] Staging: panel: Fix line over 80 characters

Quoted 11 lines · Ksenija Stanojević
Quoted 9 lines · Sudip Mukherjee
Quoted 5 lines · Ksenija Stanojevic

Split comment in order to fit into 80 characters per line. Found by checkpatch.pl

---

Instead of multiline maybe this is better:

Quoted 16 lines

drivers/staging/panel/panel.c static void lcd_clear_fast_s(void) · line 953

Quoted 13 lines
drivers/staging/panel/panel.c +2 -1
index 79ac192..3525919 100644
@@ -947,7 +947,8 @@ static void lcd_clear_fast_s(void)
                lcd_send_serial(0x5F);  /* R/W=W, RS=1 */
                lcd_send_serial(' ' & 0x0F);
                lcd_send_serial((' ' >> 4) & 0x0F);
-               usleep_range(40, 100);  /* the shortest data takes at least 40 us */
+               /* the shortest data takes at least 40 us */
+               usleep_range(40, 100);
        }
        spin_unlock_irq(&pprt_lock);

It's already been done by Bijosh Thykkoottathil:
https://lkml.org/lkml/2015/12/18/681

But I think not yet accepted by Greg. And his commit message doesnot mention what coding style errors he has fixed. Usually Greg will not accept them.

regards
sudip

#5 lore raw

PATCH 2/2 Staging: panel: Remove space

In reply to Ksenija Stanojevic

No space is necessary after a cast, therefore remove it. Found by checkpatch.pl

---
 drivers/staging/panel/panel.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/panel/panel.c +2 -2
index 7171c5d..567b584 100644
@@ -1790,7 +1790,7 @@ static void phys_scan_contacts(void)
 	gndmask = PNL_PINPUT(r_str(pprt)) & scan_mask_i;
 
 	/* grounded inputs are signals 40-44 */
-	phys_read |= (pmask_t) gndmask << 40;
+	phys_read |= (pmask_t)gndmask << 40;
 
 	if (bitmask != gndmask) {
 		/*
@@ -1806,7 +1806,7 @@ static void phys_scan_contacts(void)
 
 			w_dtr(pprt, oldval & ~bitval);	/* enable this output */
 			bitmask = PNL_PINPUT(r_str(pprt)) & ~gndmask;
-			phys_read |= (pmask_t) bitmask << (5 * bit);
+			phys_read |= (pmask_t)bitmask << (5 * bit);
 		}
 		w_dtr(pprt, oldval);	/* disable all outputs */
 	}
Signature · 1 line
1.9.1