Skip to contentSkip to conversation

Make kernel-doc ignore __init_or_module

PATCH In review William Cohen 2 participants 3 messages Mar 23, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Make kernel-doc ignore __init_or_module

Function definitions may include __init_or_module. kernel-doc needs to filter those out to avoid confusing __init_or_module for the function name.

---
 scripts/kernel-doc |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
scripts/kernel-doc +1 -0
index c7865c3..1d8db58 100755
@@ -1728,6 +1728,7 @@ sub dump_function($$) {
     $prototype =~ s/^noinline +//;
     $prototype =~ s/__devinit +//;
     $prototype =~ s/__init +//;
+    $prototype =~ s/__init_or_module +//;
     $prototype =~ s/^#\s*define\s+//; #ak added
     $prototype =~ s/__attribute__\s*\(\([a-z,]*\)\)//;
 
Signature · 1 line
1.6.6.1
#1 lore raw
Quoted 14 lines · William Cohen

Function definitions may include __init_or_module. kernel-doc needs to filter those out to avoid confusing __init_or_module for the function name.

---
 scripts/kernel-doc |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
scripts/kernel-doc +0 -0
index c7865c3..1d8db58 100755

scripts/kernel-doc sub dump_function($$) { · line 1734

Quoted 7 lines
scripts/kernel-doc +1 -0
@@ -1728,6 +1728,7 @@ sub dump_function($$) {
     $prototype =~ s/^noinline +//;
     $prototype =~ s/__devinit +//;
     $prototype =~ s/__init +//;
+    $prototype =~ s/__init_or_module +//;
     $prototype =~ s/^#\s*define\s+//; #ak added
     $prototype =~ s/__attribute__\s*\(\([a-z,]*\)\)//;
 

Hi,

Yes, I know. I've already sent this patch to Linus more than once and now Andrew has it for merging...

Signature · 1 line
~Randy
#2 lore raw
Quoted 25 lines · Randy Dunlap
Quoted 14 lines · William Cohen

Function definitions may include __init_or_module. kernel-doc needs to filter those out to avoid confusing __init_or_module for the function name.

---
 scripts/kernel-doc |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
scripts/kernel-doc +0 -0
index c7865c3..1d8db58 100755

scripts/kernel-doc sub dump_function($$) { · line 1734

Quoted 7 lines
scripts/kernel-doc +1 -0
@@ -1728,6 +1728,7 @@ sub dump_function($$) {
     $prototype =~ s/^noinline +//;
     $prototype =~ s/__devinit +//;
     $prototype =~ s/__init +//;
+    $prototype =~ s/__init_or_module +//;
     $prototype =~ s/^#\s*define\s+//; #ak added
     $prototype =~ s/__attribute__\s*\(\([a-z,]*\)\)//;
 

Hi,

Quoted 3 lines

Yes, I know. I've already sent this patch to Linus more than once and now Andrew has it for merging...

Thanks, Randy. -Will