Skip to contentSkip to conversation

Some grammatical and whitespace cleanups in init.h.

PATCH In review Robert P. J. Day 2 participants 5 messages Nov 30, 2007 Kernel janitors

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Some grammatical and whitespace cleanups in init.h.

---

include/linux/init.h +7 -7
index 5141381..ca59bf8 100644
@@ -3,11 +3,10 @@
 
 #include <linux/compiler.h>
 
-/* These macros are used to mark some functions or
- * initialized data (doesn't apply to uninitialized data)
- * as `initialization' functions. The kernel can take this
- * as hint that the function is used only during the initialization
- * phase and free up used memory resources after
+/* These macros are used to mark functions and initialized
+ * data as 'initialization' objects, which tells the kernel that
+ * they are used only during the initialization phase and can be
+ * freed afterwards to recover memory.
  *
  * Usage:
  * For functions:
@@ -20,9 +19,10 @@
  * }
  *
  * If the function has a prototype somewhere, you can also add
- * __init between closing brace of the prototype and semicolon:
+ * __init to the prototype in one of two ways:
  *
  * extern int initialize_foobar_device(int, int, int) __init;
+ * extern int __init initialize_foobar_device(int, int, int);
  *
  * For initialized data:
  * You should insert __initdata between the variable name and equal
@@ -42,7 +42,7 @@
    discard it in modules) */
 #define __init		__attribute__ ((__section__ (".init.text"))) __cold
 #define __initdata	__attribute__ ((__section__ (".init.data")))
-#define __exitdata	__attribute__ ((__section__(".exit.data")))
+#define __exitdata	__attribute__ ((__section__ (".exit.data")))
 #define __exit_call	__attribute_used__ __attribute__ ((__section__ (".exitcall.exit")))
 
 /* modpost check for section mismatches during the kernel build.

====================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry Waterloo, Ontario, CANADA

http://crashcourse.ca
====================================

#1 lore raw

include/linux/init.h line 9

Quoted 9 lines · Robert P. J. Day
include/linux/init.h +4 -5
-/* These macros are used to mark some functions or
- * initialized data (doesn't apply to uninitialized data)
- * as `initialization' functions. The kernel can take this
- * as hint that the function is used only during the initialization
- * phase and free up used memory resources after
+/* These macros are used to mark functions and initialized
+ * data as 'initialization' objects, which tells the kernel that
+ * they are used only during the initialization phase and can be
+ * freed afterwards to recover memory.

If you're going to get rid of 'some', then you need to change 'are' to 'may be' or 'can be'.

Signature · 4 lines
Intel are signing my paycheques ... these opinions are still mine
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours.  We can't possibly take such
a retrograde step."
#2 lore raw
In reply to Robert P. J. Day
Quoted 13 lines · Matthew Wilcox

include/linux/init.h line 9

Quoted 9 lines · Robert P. J. Day
include/linux/init.h +4 -5
-/* These macros are used to mark some functions or
- * initialized data (doesn't apply to uninitialized data)
- * as `initialization' functions. The kernel can take this
- * as hint that the function is used only during the initialization
- * phase and free up used memory resources after
+/* These macros are used to mark functions and initialized
+ * data as 'initialization' objects, which tells the kernel that
+ * they are used only during the initialization phase and can be
+ * freed afterwards to recover memory.

If you're going to get rid of 'some', then you need to change 'are' to 'may be' or 'can be'.

i'm sorry, i don't see a problem here. that replacement text looks perfectly unambiguous. how do you think it might be misinterpreted?

rday
--
====================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry Waterloo, Ontario, CANADA

http://crashcourse.ca
====================================

#3 lore raw
In reply to Robert P. J. Day
Quoted 16 lines · Robert P. J. Day
Quoted 13 lines · Matthew Wilcox

include/linux/init.h line 9

Quoted 9 lines · Robert P. J. Day
include/linux/init.h +4 -5
-/* These macros are used to mark some functions or
- * initialized data (doesn't apply to uninitialized data)
- * as `initialization' functions. The kernel can take this
- * as hint that the function is used only during the initialization
- * phase and free up used memory resources after
+/* These macros are used to mark functions and initialized
+ * data as 'initialization' objects, which tells the kernel that
+ * they are used only during the initialization phase and can be
+ * freed afterwards to recover memory.

If you're going to get rid of 'some', then you need to change 'are' to 'may be' or 'can be'.

Quoted 2 lines

i'm sorry, i don't see a problem here. that replacement text looks perfectly unambiguous. how do you think it might be misinterpreted?

It implies that all functions have to be marked as __init, which is plainly not true.

Signature · 4 lines
Intel are signing my paycheques ... these opinions are still mine
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours.  We can't possibly take such
a retrograde step."
#4 lore raw
In reply to Robert P. J. Day
Quoted 17 lines · Matthew Wilcox
Quoted 16 lines · Robert P. J. Day
Quoted 13 lines · Matthew Wilcox

include/linux/init.h line 9

Quoted 9 lines · Robert P. J. Day
include/linux/init.h +4 -5
-/* These macros are used to mark some functions or
- * initialized data (doesn't apply to uninitialized data)
- * as `initialization' functions. The kernel can take this
- * as hint that the function is used only during the initialization
- * phase and free up used memory resources after
+/* These macros are used to mark functions and initialized
+ * data as 'initialization' objects, which tells the kernel that
+ * they are used only during the initialization phase and can be
+ * freed afterwards to recover memory.

If you're going to get rid of 'some', then you need to change 'are' to 'may be' or 'can be'.

Quoted 5 lines
Quoted 2 lines

i'm sorry, i don't see a problem here. that replacement text looks perfectly unambiguous. how do you think it might be misinterpreted?

It implies that all functions have to be marked as __init, which is plainly not true.

what nonsense. the word "some" is entirely superfluous there. are you saying you would be confused if i said something like, "these red tags are used to identify merchandise in the store that is on sale at 50% off." are you seriously saying that, without the word "some", you would think i was talking about every single piece of merchandise?

rday

====================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry Waterloo, Ontario, CANADA

http://crashcourse.ca
====================================