From: Randy Dunlap Date: Thu, 19 Jun 2008 23:03:29 +0000 (-0700) Subject: kernel-doc: handle/strip __init X-Git-Tag: v2.6.27-rc1~58^2~9 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=74fc5c653c5d0f9d4d70499709a68e61c4acf991;p=linux-2.6-omap-h63xx.git kernel-doc: handle/strip __init Handle __init in functions with kernel-doc notation by stripping the __init away from the output doc. This is already being done for "__devinit". This patch fixes these kernel-doc error/aborts: Error(linux-next-20080619//drivers/usb/gadget/config.c:132): cannot understand prototype: 'struct usb_descriptor_header **__init usb_copy_descriptors(struct usb_descriptor_header **src) ' Error(linux-next-20080619//drivers/usb/gadget/config.c:182): cannot understand prototype: 'struct usb_endpoint_descriptor *__init usb_find_endpoint( struct usb_descriptor_header **src, struct usb_descriptor_header **copy, struct usb_endpoint_descriptor *match ) ' Signed-off-by: Randy Dunlap Cc: David Brownell Signed-off-by: Sam Ravnborg --- diff --git a/scripts/kernel-doc b/scripts/kernel-doc index 88e3934a8b8..d8f77e26081 100755 --- a/scripts/kernel-doc +++ b/scripts/kernel-doc @@ -1643,6 +1643,7 @@ sub dump_function($$) { $prototype =~ s/^__always_inline +//; $prototype =~ s/^noinline +//; $prototype =~ s/__devinit +//; + $prototype =~ s/__init +//; $prototype =~ s/^#define\s+//; #ak added $prototype =~ s/__attribute__\s*\(\([a-z,]*\)\)//;