driverdev-devel.linuxdriverproject.org archive mirror
 help / color / mirror / Atom feed
From: Lior Pugatch <buzz5800@gmail.com>
To: gregkh@linuxfoundation.org, willy@meta-x.org
Cc: driverdev-devel@linuxdriverproject.org,
	Lior Pugatch <buzz5800@gmail.com>
Subject: [PATCH] Fix coding style issues.
Date: Wed,  5 Aug 2015 23:19:53 +0300	[thread overview]
Message-ID: <1438805993-12287-1-git-send-email-buzz5800@gmail.com> (raw)

This patch fixes checkpatch.pl warnings,
related to comments.

Signed-off-by: Lior Pugatch <buzz5800@gmail.com>
---
 drivers/staging/panel/panel.c | 38 +++++++++++++++++++++++++-------------
 1 file changed, 25 insertions(+), 13 deletions(-)

diff --git a/drivers/staging/panel/panel.c b/drivers/staging/panel/panel.c
index 3e9ee7e..6b96369 100644
--- a/drivers/staging/panel/panel.c
+++ b/drivers/staging/panel/panel.c
@@ -785,6 +785,7 @@ static void long_sleep(int ms)
  * send a serial byte to the LCD panel. The caller is responsible for locking
  * if needed.
  */
+
 static void lcd_send_serial(int byte)
 {
 	int bit;
@@ -910,7 +911,8 @@ static void lcd_gotoxy(void)
 	lcd_write_cmd(LCD_CMD_SET_DDRAM_ADDR
 		      | (lcd.addr.y ? lcd.hwidth : 0)
 		      /* we force the cursor to stay at the end of the
-			 line if it wants to go farther */
+		       * line if it wants to go farther
+		       */
 		      | ((lcd.addr.x < lcd.bwidth) ? lcd.addr.x &
 			 (lcd.hwidth - 1) : lcd.bwidth - 1));
 }
@@ -1064,11 +1066,9 @@ static void lcd_init_display(void)
 	lcd_clear_display();
 }
 
-/*
- * These are the file operation function for user access to /dev/lcd
+/* These are the file operation function for user access to /dev/lcd
  * This function can also be called from inside the kernel, by
  * setting file and ppos to NULL.
- *
  */
 
 static inline int handle_lcd_special_code(void)
@@ -1295,7 +1295,8 @@ static inline int handle_lcd_special_code(void)
 				lcd_backlight(1);
 			else if (lcd.light_tempo == 0)
 				/* switch off the light only when the tempo
-				   lighting is gone */
+				 *  lighting is gone
+				 */
 				lcd_backlight(0);
 		}
 	}
@@ -1324,7 +1325,8 @@ static void lcd_write_char(char c)
 			/* go back one char and clear it */
 			if (lcd.addr.x > 0) {
 				/* check if we're not at the
-				   end of the line */
+				 *  end of the line
+				 */
 				if (lcd.addr.x < lcd.bwidth)
 					/* back one char */
 					lcd_write_cmd(LCD_CMD_SHIFT);
@@ -1341,7 +1343,8 @@ static void lcd_write_char(char c)
 			break;
 		case '\n':
 			/* flush the remainder of the current line and
-			   go to the beginning of the next line */
+			 * go to the beginning of the next line
+			 */
 			for (; lcd.addr.x < lcd.bwidth; lcd.addr.x++)
 				lcd_write_data(' ');
 			lcd.addr.x = 0;
@@ -1365,7 +1368,9 @@ static void lcd_write_char(char c)
 	}
 
 	/* now we'll see if we're in an escape mode and if the current
-	   escape sequence can be understood. */
+	 *  escape sequence can be understood.
+	 */
+
 	if (lcd.esc_seq.len >= 2) {
 		int processed = 0;
 
@@ -1388,8 +1393,10 @@ static void lcd_write_char(char c)
 		}
 
 		/* LCD special escape codes */
+
 		/* flush the escape sequence if it's been processed
-		   or if it is getting too long. */
+		 * or if it is getting too long.
+		 */
 		if (processed || (lcd.esc_seq.len >= LCD_ESCAPE_LEN))
 			lcd.esc_seq.len = -1;
 	} /* escape codes */
@@ -1404,7 +1411,8 @@ static ssize_t lcd_write(struct file *file,
 	for (; count-- > 0; (*ppos)++, tmp++) {
 		if (!in_interrupt() && (((count + 1) & 0x1f) == 0))
 			/* let's be a little nice with other processes
-			   that need some CPU */
+			 * that need some CPU.
+			 */
 			schedule();
 
 		if (get_user(c, tmp))
@@ -1460,7 +1468,8 @@ static void panel_lcd_print(const char *s)
 		for (; count-- > 0; tmp++) {
 			if (!in_interrupt() && (((count + 1) & 0x1f) == 0))
 				/* let's be a little nice with other processes
-				   that need some CPU */
+				 * that need some CPU.
+				 */
 				schedule();
 
 			lcd_write_char(*tmp);
@@ -1636,7 +1645,9 @@ static void lcd_init(void)
 
 	/* before this line, we must NOT send anything to the display.
 	 * Since lcd_init_display() needs to write data, we have to
-	 * enable mark the LCD initialized just before. */
+	 * enable mark the LCD initialized just before.
+	 */
+
 	lcd.initialized = true;
 	lcd_init_display();
 
@@ -1787,7 +1798,8 @@ static void phys_scan_contacts(void)
 		w_dtr(pprt, oldval);	/* disable all outputs */
 	}
 	/* this is easy: use old bits when they are flapping,
-	 * use new ones when stable */
+	 * use new ones when stable.
+	 */
 	phys_curr = (phys_prev & (phys_read ^ phys_read_prev)) |
 		    (phys_read & ~(phys_read ^ phys_read_prev));
 }
-- 
1.9.1

             reply	other threads:[~2015-08-05 20:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-05 20:19 Lior Pugatch [this message]
2015-08-05 20:38 ` [PATCH] Fix coding style issues Greg KH
2020-07-24 20:25 Anant Thazhemadam
2020-07-25  5:49 ` Greg Kroah-Hartman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1438805993-12287-1-git-send-email-buzz5800@gmail.com \
    --to=buzz5800@gmail.com \
    --cc=driverdev-devel@linuxdriverproject.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=willy@meta-x.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).