Skip to contentSkip to conversation

- trivial comment fixups in init/main.c

PATCH In review Tim Bird 4 participants 6 messages Jul 13, 2004 – Aug 26, 2004

lore
Share & tools
lore

Tim Bird

author
#0 lore raw

PATCH 1/1 - trivial comment fixups in init/main.c

This patch has some trivial comment fixups for init/main.c, to bring the comments into consistency with the coding style of the kernel.

These modifications were originally made by Adam Kropelin These came to our attention while working on a patch to calibrate_delay(), and I thought we should separate these changes from that patch.

The patch applies silently against 2.6.7 and cleanly but with hunk offsets to 2.6.7-bk20.

main.c | 21 +++++++++++++--------

 1 files changed, 13 insertions(+), 8 deletions(-)

Please apply.

=============================
Tim Bird
Architecture Group Co-Chair, CE Linux Forum
Senior Staff Engineer, Sony Electronics
E-mail: [email protected]
=============================

--

init/main.c +13 -8
diff -u -X /home/tbird/dontdiff -ruN linux-2.6.7.orig/init/main.c patch5/init/main.c
@@ -238,8 +264,10 @@
 __setup("debug", debug_kernel);
 __setup("quiet", quiet_kernel);
 
-/* Unknown boot options get handed to init, unless they look like
-   failed parameters */
+/*
+ * Unknown boot options get handed to init, unless they look like
+ * failed parameters
+ */
 static int __init unknown_bootoption(char *param, char *val)
 {
 	/* Change NUL term back to "=", to make "param" the whole string. */
@@ -250,8 +278,10 @@
 	if (obsolete_checksetup(param))
 		return 0;
 
-	/* Preemptive maintenance for "why didn't my mispelled command
-           line work?" */
+	/*
+	 * Preemptive maintenance for "why didn't my mispelled command
+	 * line work?"
+	 */
 	if (strchr(param, '.') && (!val || strchr(param, '.') < val)) {
 		printk(KERN_ERR "Unknown boot option `%s': ignoring\n", param);
 		return 0;
@@ -289,7 +319,8 @@
 	unsigned int i;
 
 	execute_command = str;
-	/* In case LILO is going to boot us with default command line,
+	/*
+	 * In case LILO is going to boot us with default command line,
 	 * it prepends "auto" before the whole cmdline which makes
 	 * the shell think it should execute a script with such name.
 	 * So we ignore all arguments entered _before_ init=... [MJ]
@@ -483,9 +514,9 @@
 	check_bugs();
 
 	/*
-	 *	We count on the initial thread going ok
-	 *	Like idlers init is an unlocked kernel thread, which will
-	 *	make syscalls (and thus be locked).
+	 * We count on the initial thread going ok
+	 * Like idlers init is an unlocked kernel thread, which will
+	 * make syscalls (and thus be locked).
 	 */
 	init_idle(current, smp_processor_id());
 
#1 lore raw

In message <[email protected]> you write:

Quoted 2 lines

This patch has some trivial comment fixups for init/main.c, to bring the comments into consistency with the coding style of the kernel.

Personally, I prefer my comments quiet and unobtrusive, and I think you'll find Linus' code tends to be the same.

Not to start a flame war, but since I started using a colorizing editor for code, I found there was no need to waste vertical space with large banners. (This in my mind justifies the X project's entire existence).

Sorry,
Rusty.

Quoted 41 lines

diff -u -X /home/tbird/dontdiff -ruN linux-2.6.7.orig/init/main.c patch5/init/main.c

init/main.c +10 -5
@@ -238,8 +264,10 @@
  __setup("debug", debug_kernel);
  __setup("quiet", quiet_kernel);
 
-/* Unknown boot options get handed to init, unless they look like
-   failed parameters */
+/*
+ * Unknown boot options get handed to init, unless they look like
+ * failed parameters
+ */
  static int __init unknown_bootoption(char *param, char *val)
  {
  	/* Change NUL term back to "=", to make "param" the whole string. */
@@ -250,8 +278,10 @@
  	if (obsolete_checksetup(param))
  		return 0;
 
-	/* Preemptive maintenance for "why didn't my mispelled command
-           line work?" */
+	/*
+	 * Preemptive maintenance for "why didn't my mispelled command
+	 * line work?"
+	 */
  	if (strchr(param, '.') && (!val || strchr(param, '.') < val)) {
  		printk(KERN_ERR "Unknown boot option `%s': ignoring\n", param);
  		return 0;
@@ -289,7 +319,8 @@
  	unsigned int i;
 
  	execute_command = str;
-	/* In case LILO is going to boot us with default command line,
+	/*
+	 * In case LILO is going to boot us with default command line,
  	 * it prepends "auto" before the whole cmdline which makes
  	 * the shell think it should execute a script with such name.
  	 * So we ignore all arguments entered _before_ init=... [MJ]
@@ -483,9 +514,9 @@
  	check_bugs();

init/main.c line 521

Quoted 10 lines
init/main.c +3 -3
 
  	/*
-	 *	We count on the initial thread going ok
-	 *	Like idlers init is an unlocked kernel thread, which will
-	 *	make syscalls (and thus be locked).
+	 * We count on the initial thread going ok
+	 * Like idlers init is an unlocked kernel thread, which will
+	 * make syscalls (and thus be locked).
  	 */
  	init_idle(current, smp_processor_id());

--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.

#2 lore raw
Quoted 11 lines · Rusty Russell

In message <[email protected]> you write:

Quoted 2 lines

This patch has some trivial comment fixups for init/main.c, to bring the comments into consistency with the coding style of the kernel.

Personally, I prefer my comments quiet and unobtrusive, and I think you'll find Linus' code tends to be the same.

Not to start a flame war, but since I started using a colorizing editor for code, I found there was no need to waste vertical space with large banners. (This in my mind justifies the X project's entire existence).

Personally, I agree with you. Andrew specifically requested this patch to bring a few oddball comments in line with those throughout the rest of the file. I'd be happy to go the other way instead.

--Adam

author
#3 lore raw
In reply to Rusty Russell
Quoted 9 lines · Rusty Russell

In message <[email protected]> you write:

Quoted 2 lines

This patch has some trivial comment fixups for init/main.c, to bring the comments into consistency with the coding style of the kernel.

Personally, I prefer my comments quiet and unobtrusive, and I think you'll find Linus' code tends to be the same.

Quoted 6 lines

Not to start a flame war, but since I started using a colorizing editor for code, I found there was no need to waste vertical space with large banners. (This in my mind justifies the X project's entire existence).

Sorry,

Fine with me. These comments were modified at the request of Andrew Morton, who wanted the comment style to be consistent. I actually agree with your position, but I wanted to follow what Andrew wanted here.

=============================
Tim Bird
Architecture Group Co-Chair, CE Linux Forum
Senior Staff Engineer, Sony Electronics
E-mail: [email protected]
=============================

#4 lore raw
Quoted 4 lines

Fine with me. These comments were modified at the request of Andrew Morton, who wanted the comment style to be consistent. I actually agree with your position, but I wanted to follow what Andrew wanted here.

Please fix the comments anyway. Rusty's preffered style is by far the minority in core kernel code.

#5 lore raw
Quoted 7 lines · Christoph Hellwig
Quoted 4 lines

Fine with me. These comments were modified at the request of Andrew Morton, who wanted the comment style to be consistent. I actually agree with your position, but I wanted to follow what Andrew wanted here.

Please fix the comments anyway. Rusty's preffered style is by far the minority in core kernel code.

I went back and looked; you're right. Generally, I hate to waste vertical whitespace inside a function.

As I said, the balance with a color-coded editor is different than when reading code on paper.

Cheers,
Rusty.

Signature · 1 line
Anyone who quotes me in their signature is an idiot -- Rusty Russell