mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com>
To: linux-kernel@vger.kernel.org, bunk@kernel.org
Subject: [PATCH] This patch to printk.c fixes a few errors reported by checkpatch.pl
Date: Fri, 4 Jan 2008 00:14:46 +0100	[thread overview]
Message-ID: <20080104001446.66f0c110@paolo-desktop> (raw)

This patch to printk.c fixes a few errors reported by checkpatch.pl

Before:
total: 18 errors, 17 warnings, 1306 lines checked

After:
total: 1 errors, 17 warnings, 1305 lines checked


Signed-off-by: Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com>
---

Adrian, I'm sending this patch to you because according to git shortlog -e
you are the most active modifier of this file.


 kernel/printk.c |   25 ++++++++++++-------------
 1 files changed, 12 insertions(+), 13 deletions(-)

diff --git a/kernel/printk.c b/kernel/printk.c
index 89011bf..00f784f 100644
--- a/kernel/printk.c
+++ b/kernel/printk.c
@@ -100,8 +100,7 @@ static unsigned long log_end;	/* Index into log_buf: most-recently-written-char
 /*
  *	Array of consoles built from command line options (console=)
  */
-struct console_cmdline
-{
+struct console_cmdline {
 	char	name[8];			/* Name of the driver	    */
 	int	index;				/* Minor dev. to use	    */
 	char	*options;			/* Options for the driver   */
@@ -323,7 +322,7 @@ int do_syslog(int type, char __user *buf, int len)
 			c = LOG_BUF(log_start);
 			log_start++;
 			spin_unlock_irq(&logbuf_lock);
-			error = __put_user(c,buf);
+			error = __put_user(c, buf);
 			buf++;
 			i++;
 			cond_resched();
@@ -368,7 +367,7 @@ int do_syslog(int type, char __user *buf, int len)
 				break;
 			c = LOG_BUF(j);
 			spin_unlock_irq(&logbuf_lock);
-			error = __put_user(c,&buf[count-1-i]);
+			error = __put_user(c, &buf[count-1-i]);
 			cond_resched();
 			spin_lock_irq(&logbuf_lock);
 		}
@@ -380,8 +379,8 @@ int do_syslog(int type, char __user *buf, int len)
 			int offset = count-error;
 			/* buffer overflow during copy, correct user buffer. */
 			for (i = 0; i < error; i++) {
-				if (__get_user(c,&buf[i+offset]) ||
-				    __put_user(c,&buf[i])) {
+				if (__get_user(c, &buf[i+offset]) ||
+				    __put_user(c, &buf[i])) {
 					error = -EFAULT;
 					break;
 				}
@@ -556,7 +555,7 @@ static void zap_locks(void)
 #if defined(CONFIG_PRINTK_TIME)
 static int printk_time = 1;
 #else
-static int printk_time = 0;
+static int printk_time ;
 #endif
 module_param_named(time, printk_time, bool, S_IRUGO | S_IWUSR);
 
@@ -659,7 +658,7 @@ asmlinkage int vprintk(const char *fmt, va_list args)
 	 */
 	for (p = printk_buf; *p; p++) {
 		if (log_level_unknown) {
-                        /* log_level_unknown signals the start of a new line */
+			/* log_level_unknown signals the start of a new line */
 			if (printk_time) {
 				int loglev_char;
 				char tbuf[50], *tp;
@@ -671,7 +670,7 @@ asmlinkage int vprintk(const char *fmt, va_list args)
 				 * force the log level token to be
 				 * before the time output.
 				 */
-				if (p[0] == '<' && p[1] >='0' &&
+				if (p[0] == '<' && p[1] >= '0' &&
 				   p[1] <= '7' && p[2] == '>') {
 					loglev_char = p[1];
 					p += 3;
@@ -1176,16 +1175,16 @@ EXPORT_SYMBOL(register_console);
 
 int unregister_console(struct console *console)
 {
-        struct console *a, *b;
+	struct console *a, *b;
 	int res = 1;
 
 	acquire_console_sem();
 	if (console_drivers == console) {
-		console_drivers=console->next;
+		console_drivers = console->next;
 		res = 0;
 	} else if (console_drivers) {
-		for (a=console_drivers->next, b=console_drivers ;
-		     a; b=a, a=b->next) {
+		for (a = console_drivers->next, b = console_drivers ;
+		     a; b = a, a = b->next) {
 			if (a == console) {
 				b->next = a->next;
 				res = 0;
-- 
1.5.4.rc2.17.g257f


             reply	other threads:[~2008-01-03 23:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-03 23:14 Paolo Ciarrocchi [this message]
2008-01-03 23:42 ` Jesper Juhl
2008-01-03 23:47 ` Randy Dunlap

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=20080104001446.66f0c110@paolo-desktop \
    --to=paolo.ciarrocchi@gmail.com \
    --cc=bunk@kernel.org \
    --cc=linux-kernel@vger.kernel.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

all inboxes | Powered by JetHome®