Skip to contentSkip to conversation

kernel-doc: ignore __devinit

PATCH In review Randy Dunlap 3 participants 3 messages Jul 18, 2006 – Jul 19, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 kernel-doc: ignore __devinit

From: Randy Dunlap <[email protected]>

Ignore __devinit in function definitions so that kernel-doc won't fail on them.

---
 scripts/kernel-doc |    1 +
 1 file changed, 1 insertion(+)
scripts/kernel-doc +1 -0
@@ -1518,6 +1518,7 @@ sub dump_function($$) {
     $prototype =~ s/^asmlinkage +//;
     $prototype =~ s/^inline +//;
     $prototype =~ s/^__inline__ +//;
+    $prototype =~ s/__devinit +//;
     $prototype =~ s/^#define +//; #ak added
     $prototype =~ s/__attribute__ \(\([a-z,]*\)\)//;
 
#1 lore raw

hoi :)

Quoted 4 lines · Randy Dunlap

From: Randy Dunlap <[email protected]>

Ignore __devinit in function definitions so that kernel-doc won't fail on them.

why would it fall over __devinit?
And shouldn't we add __{dev}?init{data}? while we are at it?

Signature · 1 line
Martin Waitz
#2 lore raw
Quoted 9 lines · Martin Waitz

hoi :)

Quoted 4 lines · Randy Dunlap

From: Randy Dunlap <[email protected]>

Ignore __devinit in function definitions so that kernel-doc won't fail on them.

why would it fall over __devinit?

It doesn't match any of those awful regex strings when looking for function prototypes, so kernel-doc (the script) coughs and dies, as noted in DocBook/kernel-api.tmpl for drivers/pci/search.c.

Quoted 1 line

And shouldn't we add __{dev}?init{data}? while we are at it?

Yes, in theory at least (for __init and __exit, not __initdata, since this is in function definitios).
I just haven't run into the need for those yet.

Signature · 1 line
~Randy