All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] Staging: panel: Fix checkpatch issues
@ 2015-10-26 20:41 Swetha
  2015-10-26 20:43 ` [PATCH 1/4] Staging: panel: spaces preferred around that '/' Swetha
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Swetha @ 2015-10-26 20:41 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: linux-usb

This patchset fixes the checkpatch issues for panel.

Swetha (4):
  Staging: panel: spaces preferred around that '/'
  Staging: panel: Removing multiple blank lines
  Staging: panel: usleep_range is preferred over udelay
  Staging: panel: Logical continuations should be on the previous line

 drivers/staging/panel/panel.c | 49 +++++++++++++++++++++++--------------------
 1 file changed, 26 insertions(+), 23 deletions(-)

-- 
1.9.1



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

* [PATCH 1/4] Staging: panel: spaces preferred around that '/'
  2015-10-26 20:41 [PATCH 0/4] Staging: panel: Fix checkpatch issues Swetha
@ 2015-10-26 20:43 ` Swetha
  2015-10-26 20:43 ` [PATCH 2/4] Staging: panel: Removing multiple blank lines Swetha
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Swetha @ 2015-10-26 20:43 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: linux-usb

This patch fixes the checkpatch issue:

CHECK: spaces preferred around that '/'

Signed-off-by: Swetha <theonly.ultimate@gmail.com>
---
 drivers/staging/panel/panel.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/panel/panel.c b/drivers/staging/panel/panel.c
index a7e3875..030a0cf 100644
--- a/drivers/staging/panel/panel.c
+++ b/drivers/staging/panel/panel.c
@@ -71,7 +71,7 @@
 #define KEYPAD_BUFFER		64
 
 /* poll the keyboard this every second */
-#define INPUT_POLL_TIME		(HZ/50)
+#define INPUT_POLL_TIME		(HZ / 50)
 /* a key starts to repeat after this times INPUT_POLL_TIME */
 #define KEYPAD_REP_START	(10)
 /* a key repeats this times INPUT_POLL_TIME */
-- 
1.9.1



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

* [PATCH 2/4] Staging: panel: Removing multiple blank lines
  2015-10-26 20:41 [PATCH 0/4] Staging: panel: Fix checkpatch issues Swetha
  2015-10-26 20:43 ` [PATCH 1/4] Staging: panel: spaces preferred around that '/' Swetha
@ 2015-10-26 20:43 ` Swetha
  2015-10-26 20:44 ` [PATCH 3/4] Staging: panel: usleep_range is preferred over udelay Swetha
  2015-10-26 20:44 ` [PATCH 4/4] Staging: panel: Logical continuations should be on the previous line Swetha
  3 siblings, 0 replies; 6+ messages in thread
From: Swetha @ 2015-10-26 20:43 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: linux-usb

This patch fixes the checkpatch issue

CHECK: Please don't use multiple blank lines

Signed-off-by: Swetha <theonly.ultimate@gmail.com>
---
 drivers/staging/panel/panel.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/panel/panel.c b/drivers/staging/panel/panel.c
index 030a0cf..11a50f6 100644
--- a/drivers/staging/panel/panel.c
+++ b/drivers/staging/panel/panel.c
@@ -576,7 +576,6 @@ static int keypad_enabled = NOT_SET;
 module_param(keypad_enabled, int, 0000);
 MODULE_PARM_DESC(keypad_enabled, "Deprecated option, use keypad_type instead");
 
-
 static const unsigned char *lcd_char_conv;
 
 /* for some LCD drivers (ks0074) we need a charset conversion table. */
-- 
1.9.1



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

* [PATCH 3/4] Staging: panel: usleep_range is preferred over udelay
  2015-10-26 20:41 [PATCH 0/4] Staging: panel: Fix checkpatch issues Swetha
  2015-10-26 20:43 ` [PATCH 1/4] Staging: panel: spaces preferred around that '/' Swetha
  2015-10-26 20:43 ` [PATCH 2/4] Staging: panel: Removing multiple blank lines Swetha
@ 2015-10-26 20:44 ` Swetha
  2015-10-26 20:44 ` [PATCH 4/4] Staging: panel: Logical continuations should be on the previous line Swetha
  3 siblings, 0 replies; 6+ messages in thread
From: Swetha @ 2015-10-26 20:44 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: linux-usb

This patch fixes the issue:

CHECK: usleep_range is preferred over udelay; see
Documentation/timers/timers-howto.txt

Signed-off-by: Swetha <theonly.ultimate@gmail.com>
---
 drivers/staging/panel/panel.c | 34 +++++++++++++++++++---------------
 1 file changed, 19 insertions(+), 15 deletions(-)

diff --git a/drivers/staging/panel/panel.c b/drivers/staging/panel/panel.c
index 11a50f6..66ad4d0 100644
--- a/drivers/staging/panel/panel.c
+++ b/drivers/staging/panel/panel.c
@@ -825,7 +825,8 @@ static void lcd_write_cmd_s(int cmd)
 	lcd_send_serial(0x1F);	/* R/W=W, RS=0 */
 	lcd_send_serial(cmd & 0x0F);
 	lcd_send_serial((cmd >> 4) & 0x0F);
-	udelay(40);		/* the shortest command takes at least 40 us */
+	/* the shortest command takes at least 40 us */
+	usleep_range(40, 100);
 	spin_unlock_irq(&pprt_lock);
 }
 
@@ -836,7 +837,8 @@ static void lcd_write_data_s(int data)
 	lcd_send_serial(0x5F);	/* R/W=W, RS=1 */
 	lcd_send_serial(data & 0x0F);
 	lcd_send_serial((data >> 4) & 0x0F);
-	udelay(40);		/* 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);
 }
 
@@ -846,19 +848,20 @@ static void lcd_write_cmd_p8(int cmd)
 	spin_lock_irq(&pprt_lock);
 	/* present the data to the data port */
 	w_dtr(pprt, cmd);
-	udelay(20);	/* maintain the data during 20 us before the strobe */
+	/* maintain the data during 20 us before the strobe */
+	usleep_range(20, 100);
 
 	bits.e = BIT_SET;
 	bits.rs = BIT_CLR;
 	bits.rw = BIT_CLR;
 	set_ctrl_bits();
 
-	udelay(40);	/* maintain the strobe during 40 us */
+	usleep_range(40, 100);	/* maintain the strobe during 40 us */
 
 	bits.e = BIT_CLR;
 	set_ctrl_bits();
 
-	udelay(120);	/* the shortest command takes at least 120 us */
+	usleep_range(120, 500);	/* the shortest command takes at least 120 us */
 	spin_unlock_irq(&pprt_lock);
 }
 
@@ -868,19 +871,20 @@ static void lcd_write_data_p8(int data)
 	spin_lock_irq(&pprt_lock);
 	/* present the data to the data port */
 	w_dtr(pprt, data);
-	udelay(20);	/* maintain the data during 20 us before the strobe */
+	/* maintain the data during 20 us before the strobe */
+	usleep_range(20, 100);
 
 	bits.e = BIT_SET;
 	bits.rs = BIT_SET;
 	bits.rw = BIT_CLR;
 	set_ctrl_bits();
 
-	udelay(40);	/* maintain the strobe during 40 us */
+	usleep_range(40, 100);	/* maintain the strobe during 40 us */
 
 	bits.e = BIT_CLR;
 	set_ctrl_bits();
 
-	udelay(45);	/* the shortest data takes at least 45 us */
+	usleep_range(45, 100);	/* the shortest data takes at least 45 us */
 	spin_unlock_irq(&pprt_lock);
 }
 
@@ -890,7 +894,7 @@ static void lcd_write_cmd_tilcd(int cmd)
 	spin_lock_irq(&pprt_lock);
 	/* present the data to the control port */
 	w_ctr(pprt, cmd);
-	udelay(60);
+	usleep_range(60, 120);
 	spin_unlock_irq(&pprt_lock);
 }
 
@@ -900,7 +904,7 @@ static void lcd_write_data_tilcd(int data)
 	spin_lock_irq(&pprt_lock);
 	/* present the data to the data port */
 	w_dtr(pprt, data);
-	udelay(60);
+	usleep_range(60, 120);
 	spin_unlock_irq(&pprt_lock);
 }
 
@@ -943,7 +947,7 @@ 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);
-		udelay(40);	/* 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);
 
@@ -967,7 +971,7 @@ static void lcd_clear_fast_p8(void)
 		w_dtr(pprt, ' ');
 
 		/* maintain the data during 20 us before the strobe */
-		udelay(20);
+		usleep_range(20, 100);
 
 		bits.e = BIT_SET;
 		bits.rs = BIT_SET;
@@ -975,13 +979,13 @@ static void lcd_clear_fast_p8(void)
 		set_ctrl_bits();
 
 		/* maintain the strobe during 40 us */
-		udelay(40);
+		usleep_range(40, 100);
 
 		bits.e = BIT_CLR;
 		set_ctrl_bits();
 
 		/* the shortest data takes at least 45 us */
-		udelay(45);
+		usleep_range(45, 100);
 	}
 	spin_unlock_irq(&pprt_lock);
 
@@ -1003,7 +1007,7 @@ static void lcd_clear_fast_tilcd(void)
 	for (pos = 0; pos < lcd.height * lcd.hwidth; pos++) {
 		/* present the data to the data port */
 		w_dtr(pprt, ' ');
-		udelay(60);
+		usleep_range(60, 120);
 	}
 
 	spin_unlock_irq(&pprt_lock);
-- 
1.9.1



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

* [PATCH 4/4] Staging: panel: Logical continuations should be on the previous line
  2015-10-26 20:41 [PATCH 0/4] Staging: panel: Fix checkpatch issues Swetha
                   ` (2 preceding siblings ...)
  2015-10-26 20:44 ` [PATCH 3/4] Staging: panel: usleep_range is preferred over udelay Swetha
@ 2015-10-26 20:44 ` Swetha
  3 siblings, 0 replies; 6+ messages in thread
From: Swetha @ 2015-10-26 20:44 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: linux-usb

This patch fixes the checkpatch issue:

CHECK: Logical continuations should be on the previous line

Signed-off-by: Swetha <theonly.ultimate@gmail.com>
---
 drivers/staging/panel/panel.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/panel/panel.c b/drivers/staging/panel/panel.c
index 66ad4d0..13af8cf 100644
--- a/drivers/staging/panel/panel.c
+++ b/drivers/staging/panel/panel.c
@@ -1122,8 +1122,8 @@ static inline int handle_lcd_special_code(void)
 	case '*':
 		/* flash back light using the keypad timer */
 		if (scan_timer.function) {
-			if (lcd.light_tempo == 0
-					&& ((lcd.flags & LCD_FLAG_L) == 0))
+			if (lcd.light_tempo == 0 &&
+			    ((lcd.flags & LCD_FLAG_L) == 0))
 				lcd_backlight(1);
 			lcd.light_tempo = FLASH_LIGHT_TEMPO;
 		}
@@ -2011,14 +2011,14 @@ static void panel_scan_timer(void)
 
 	if (lcd.enabled && lcd.initialized) {
 		if (keypressed) {
-			if (lcd.light_tempo == 0
-					&& ((lcd.flags & LCD_FLAG_L) == 0))
+			if (lcd.light_tempo == 0 &&
+			    ((lcd.flags & LCD_FLAG_L) == 0))
 				lcd_backlight(1);
 			lcd.light_tempo = FLASH_LIGHT_TEMPO;
 		} else if (lcd.light_tempo > 0) {
 			lcd.light_tempo--;
-			if (lcd.light_tempo == 0
-					&& ((lcd.flags & LCD_FLAG_L) == 0))
+			if (lcd.light_tempo == 0 &&
+			    ((lcd.flags & LCD_FLAG_L) == 0))
 				lcd_backlight(0);
 		}
 	}
-- 
1.9.1



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

* [PATCH 4/4] Staging: panel: Logical continuations should be on the previous line
  2015-10-27  9:24 [PATCH 0/4] Staging: panel: Fix checkpatch issues Sirnam Swetha
@ 2015-10-27  9:26 ` Sirnam Swetha
  0 siblings, 0 replies; 6+ messages in thread
From: Sirnam Swetha @ 2015-10-27  9:26 UTC (permalink / raw)
  To: outreachy-kernel

This patch fixes the checkpatch issue:

CHECK: Logical continuations should be on the previous line

Signed-off-by: Sirnam Swetha <theonly.ultimate@gmail.com>
---
 drivers/staging/panel/panel.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/panel/panel.c b/drivers/staging/panel/panel.c
index 66ad4d0..13af8cf 100644
--- a/drivers/staging/panel/panel.c
+++ b/drivers/staging/panel/panel.c
@@ -1122,8 +1122,8 @@ static inline int handle_lcd_special_code(void)
 	case '*':
 		/* flash back light using the keypad timer */
 		if (scan_timer.function) {
-			if (lcd.light_tempo == 0
-					&& ((lcd.flags & LCD_FLAG_L) == 0))
+			if (lcd.light_tempo == 0 &&
+			    ((lcd.flags & LCD_FLAG_L) == 0))
 				lcd_backlight(1);
 			lcd.light_tempo = FLASH_LIGHT_TEMPO;
 		}
@@ -2011,14 +2011,14 @@ static void panel_scan_timer(void)
 
 	if (lcd.enabled && lcd.initialized) {
 		if (keypressed) {
-			if (lcd.light_tempo == 0
-					&& ((lcd.flags & LCD_FLAG_L) == 0))
+			if (lcd.light_tempo == 0 &&
+			    ((lcd.flags & LCD_FLAG_L) == 0))
 				lcd_backlight(1);
 			lcd.light_tempo = FLASH_LIGHT_TEMPO;
 		} else if (lcd.light_tempo > 0) {
 			lcd.light_tempo--;
-			if (lcd.light_tempo == 0
-					&& ((lcd.flags & LCD_FLAG_L) == 0))
+			if (lcd.light_tempo == 0 &&
+			    ((lcd.flags & LCD_FLAG_L) == 0))
 				lcd_backlight(0);
 		}
 	}
-- 
1.9.1



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

end of thread, other threads:[~2015-10-27  9:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-26 20:41 [PATCH 0/4] Staging: panel: Fix checkpatch issues Swetha
2015-10-26 20:43 ` [PATCH 1/4] Staging: panel: spaces preferred around that '/' Swetha
2015-10-26 20:43 ` [PATCH 2/4] Staging: panel: Removing multiple blank lines Swetha
2015-10-26 20:44 ` [PATCH 3/4] Staging: panel: usleep_range is preferred over udelay Swetha
2015-10-26 20:44 ` [PATCH 4/4] Staging: panel: Logical continuations should be on the previous line Swetha
2015-10-27  9:24 [PATCH 0/4] Staging: panel: Fix checkpatch issues Sirnam Swetha
2015-10-27  9:26 ` [PATCH 4/4] Staging: panel: Logical continuations should be on the previous line Sirnam Swetha

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.