kernel-doc: ignore unneeded attribute information
authorJonathan Corbet <corbet@lwn.net>
Sun, 23 Aug 2015 19:35:23 +0000 (13:35 -0600)
committerJonathan Corbet <corbet@lwn.net>
Sun, 23 Aug 2015 19:54:33 +0000 (13:54 -0600)
The kernel-doc script gets confused by __attribute__(()) strings in
structures, so just clean the out.  Also ignore the CRYPTO_MINALIGN_ATTR
macro used in the crypto subsystem.

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
scripts/kernel-doc

index 3a4d895b92371da2db28d208ebaf42efbed199b8..a7bf5f68aacb2f80417f31c6b6663d3d76a149f6 100755 (executable)
@@ -1799,7 +1799,9 @@ sub dump_struct($$) {
        # strip kmemcheck_bitfield_{begin,end}.*;
        $members =~ s/kmemcheck_bitfield_.*?;//gos;
        # strip attributes
+       $members =~ s/__attribute__\s*\(\([a-z,_\*\s\(\)]*\)\)//i;
        $members =~ s/__aligned\s*\([^;]*\)//gos;
+       $members =~ s/\s*CRYPTO_MINALIGN_ATTR//gos;
 
        create_parameterlist($members, ';', $file);
        check_sections($file, $declaration_name, "struct", $sectcheck, $struct_actual, $nested);