Skip to contentSkip to conversation

Fix scripts/kernel-doc to handle __attribute__

PATCH New Tom Rini 1 participant 1 message Mar 19, 2004

lore
Share & tools
lore

Tom Rini

author
#0 lore raw

PATCH 1/1 Fix scripts/kernel-doc to handle __attribute__

Hi. The following patch is needed so that kernel-doc can handle functions which have __attribute__'s on them (such as __attribute__ ((weak))). The following is against 2.6.4, but I suspect applies to any 2.6 or recent'ish 2.4.

scripts/kernel-doc +1 -0
Index: linux-2.6.4/scripts/kernel-doc
===================================================================
@@ -1376,6 +1376,7 @@
     $prototype =~ s/^inline +//;
     $prototype =~ s/^__inline__ +//;
     $prototype =~ s/^#define +//; #ak added
+    $prototype =~ s/__attribute__ \(\([a-z,]*\)\)//;
 
     # Yes, this truly is vile.  We are looking for:
     # 1. Return type (may be nothing if we're looking at a macro)
Signature · 2 lines
Tom Rini
http://gate.crashing.org/~trini/