Commit cbd8aca472134e666eee87462177f1be854ebbf8
Exists in
master
and in
20 other branches
Merge branch 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
Pull kbuild misc changes from Michal Marek: "In the non-critical part of kbuild, I have - Some make coccicheck improvements and two new tests - Support for a cleaner html output in scripts/kernel-doc, named html5 (no, it does not play videos, yet) BTW, Randy wants to route further kernel-doc patches through the kbuild tree." * 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild: Update SmPL/Coccinelle section of MAINTAINERS coccicheck: Add the rep+ctxt mode scripts/coccinelle/tests/odd_ptr_err.cocci: semantic patch for IS_ERR/PTR_ERR inconsistency scripts/tags.sh: Add magic for pci access functions scripts/coccinelle: ptr_ret: Add ternary operator version scripts/kernel-doc: drop maintainer scripts/kernel-doc: added support for html5
Showing 6 changed files Side-by-side Diff
MAINTAINERS
... | ... | @@ -1958,10 +1958,10 @@ |
1958 | 1958 | F: drivers/platform/x86/classmate-laptop.c |
1959 | 1959 | |
1960 | 1960 | COCCINELLE/Semantic Patches (SmPL) |
1961 | -M: Julia Lawall <julia@diku.dk> | |
1961 | +M: Julia Lawall <Julia.Lawall@lip6.fr> | |
1962 | 1962 | M: Gilles Muller <Gilles.Muller@lip6.fr> |
1963 | -M: Nicolas Palix <npalix.work@gmail.com> | |
1964 | -L: cocci@diku.dk (moderated for non-subscribers) | |
1963 | +M: Nicolas Palix <nicolas.palix@imag.fr> | |
1964 | +L: cocci@systeme.lip6.fr (moderated for non-subscribers) | |
1965 | 1965 | W: http://coccinelle.lip6.fr/ |
1966 | 1966 | S: Supported |
1967 | 1967 | F: scripts/coccinelle/ |
... | ... | @@ -2422,11 +2422,6 @@ |
2422 | 2422 | S: Maintained |
2423 | 2423 | F: Documentation/hwmon/dme1737 |
2424 | 2424 | F: drivers/hwmon/dme1737.c |
2425 | - | |
2426 | -DOCBOOK FOR DOCUMENTATION | |
2427 | -M: Randy Dunlap <rdunlap@xenotime.net> | |
2428 | -S: Maintained | |
2429 | -F: scripts/kernel-doc | |
2430 | 2425 | |
2431 | 2426 | DOCKING STATION DRIVER |
2432 | 2427 | M: Shaohua Li <shaohua.li@intel.com> |
scripts/coccicheck
... | ... | @@ -95,6 +95,9 @@ |
95 | 95 | $SPATCH -D report $FLAGS -sp_file $COCCI $OPT $OPTIONS -no_show_diff || \ |
96 | 96 | $SPATCH -D context $FLAGS -sp_file $COCCI $OPT $OPTIONS || \ |
97 | 97 | $SPATCH -D org $FLAGS -sp_file $COCCI $OPT $OPTIONS -no_show_diff || exit 1 |
98 | + elif [ "$MODE" = "rep+ctxt" ] ; then | |
99 | + $SPATCH -D report $FLAGS -sp_file $COCCI $OPT $OPTIONS -no_show_diff && \ | |
100 | + $SPATCH -D context $FLAGS -sp_file $COCCI $OPT $OPTIONS || exit 1 | |
98 | 101 | else |
99 | 102 | $SPATCH -D $MODE $FLAGS -sp_file $COCCI $OPT $OPTIONS || exit 1 |
100 | 103 | fi |
scripts/coccinelle/api/ptr_ret.cocci
... | ... | @@ -30,6 +30,13 @@ |
30 | 30 | - if (IS_ERR(ptr)) return PTR_ERR(ptr); return 0; |
31 | 31 | + return PTR_RET(ptr); |
32 | 32 | |
33 | +@depends on patch@ | |
34 | +expression ptr; | |
35 | +@@ | |
36 | + | |
37 | +- (IS_ERR(ptr) ? PTR_ERR(ptr) : 0) | |
38 | ++ PTR_RET(ptr) | |
39 | + | |
33 | 40 | @r1 depends on !patch@ |
34 | 41 | expression ptr; |
35 | 42 | position p1; |
... | ... | @@ -44,6 +51,13 @@ |
44 | 51 | |
45 | 52 | * if@p2 (IS_ERR(ptr)) return PTR_ERR(ptr); return 0; |
46 | 53 | |
54 | +@r3 depends on !patch@ | |
55 | +expression ptr; | |
56 | +position p3; | |
57 | +@@ | |
58 | + | |
59 | +* IS_ERR@p3(ptr) ? PTR_ERR(ptr) : 0 | |
60 | + | |
47 | 61 | @script:python depends on org@ |
48 | 62 | p << r1.p1; |
49 | 63 | @@ |
... | ... | @@ -57,6 +71,12 @@ |
57 | 71 | |
58 | 72 | coccilib.org.print_todo(p[0], "WARNING: PTR_RET can be used") |
59 | 73 | |
74 | +@script:python depends on org@ | |
75 | +p << r3.p3; | |
76 | +@@ | |
77 | + | |
78 | +coccilib.org.print_todo(p[0], "WARNING: PTR_RET can be used") | |
79 | + | |
60 | 80 | @script:python depends on report@ |
61 | 81 | p << r1.p1; |
62 | 82 | @@ |
... | ... | @@ -65,6 +85,12 @@ |
65 | 85 | |
66 | 86 | @script:python depends on report@ |
67 | 87 | p << r2.p2; |
88 | +@@ | |
89 | + | |
90 | +coccilib.report.print_report(p[0], "WARNING: PTR_RET can be used") | |
91 | + | |
92 | +@script:python depends on report@ | |
93 | +p << r3.p3; | |
68 | 94 | @@ |
69 | 95 | |
70 | 96 | coccilib.report.print_report(p[0], "WARNING: PTR_RET can be used") |
scripts/coccinelle/tests/odd_ptr_err.cocci
1 | +/// PTR_ERR should access the value just tested by IS_ERR | |
2 | +//# There can be false positives in the patch case, where it is the call | |
3 | +//# IS_ERR that is wrong. | |
4 | +/// | |
5 | +// Confidence: High | |
6 | +// Copyright: (C) 2012 Julia Lawall, INRIA. GPLv2. | |
7 | +// Copyright: (C) 2012 Gilles Muller, INRIA. GPLv2. | |
8 | +// URL: http://coccinelle.lip6.fr/ | |
9 | +// Comments: | |
10 | +// Options: -no_includes -include_headers | |
11 | + | |
12 | +virtual patch | |
13 | +virtual context | |
14 | +virtual org | |
15 | +virtual report | |
16 | + | |
17 | +@depends on patch@ | |
18 | +expression e,e1; | |
19 | +@@ | |
20 | + | |
21 | +( | |
22 | +if (IS_ERR(e)) { ... PTR_ERR(e) ... } | |
23 | +| | |
24 | +if (IS_ERR(e=e1)) { ... PTR_ERR(e) ... } | |
25 | +| | |
26 | +if (IS_ERR(e)) | |
27 | + { ... | |
28 | + PTR_ERR( | |
29 | +- e1 | |
30 | ++ e | |
31 | + ) | |
32 | + ... } | |
33 | +) | |
34 | + | |
35 | +@r depends on !patch@ | |
36 | +expression e,e1; | |
37 | +position p1,p2; | |
38 | +@@ | |
39 | + | |
40 | +( | |
41 | +if (IS_ERR(e)) { ... PTR_ERR(e) ... } | |
42 | +| | |
43 | +if (IS_ERR(e=e1)) { ... PTR_ERR(e) ... } | |
44 | +| | |
45 | +*if (IS_ERR@p1(e)) | |
46 | + { ... | |
47 | +* PTR_ERR@p2(e1) | |
48 | + ... } | |
49 | +) | |
50 | + | |
51 | +@script:python depends on org@ | |
52 | +p1 << r.p1; | |
53 | +p2 << r.p2; | |
54 | +@@ | |
55 | + | |
56 | +cocci.print_main("inconsistent IS_ERR and PTR_ERR",p1) | |
57 | +cocci.print_secs("PTR_ERR",p2) | |
58 | + | |
59 | +@script:python depends on report@ | |
60 | +p1 << r.p1; | |
61 | +p2 << r.p2; | |
62 | +@@ | |
63 | + | |
64 | +msg = "inconsistent IS_ERR and PTR_ERR, PTR_ERR on line %s" % (p2[0].line) | |
65 | +coccilib.report.print_report(p1[0],msg) |
scripts/kernel-doc
... | ... | @@ -6,6 +6,7 @@ |
6 | 6 | ## Copyright (C) 2000, 1 Tim Waugh <twaugh@redhat.com> ## |
7 | 7 | ## Copyright (C) 2001 Simon Huggins ## |
8 | 8 | ## Copyright (C) 2005-2012 Randy Dunlap ## |
9 | +## Copyright (C) 2012 Dan Luedtke ## | |
9 | 10 | ## ## |
10 | 11 | ## #define enhancements by Armin Kuster <akuster@mvista.com> ## |
11 | 12 | ## Copyright (c) 2000 MontaVista Software, Inc. ## |
... | ... | @@ -35,6 +36,8 @@ |
35 | 36 | # Small fixes (like spaces vs. \s in regex) |
36 | 37 | # -- Tim Jansen <tim@tjansen.de> |
37 | 38 | |
39 | +# 25/07/2012 - Added support for HTML5 | |
40 | +# -- Dan Luedtke <mail@danrl.de> | |
38 | 41 | |
39 | 42 | # |
40 | 43 | # This will read a 'c' file and scan for embedded comments in the |
41 | 44 | |
42 | 45 | |
... | ... | @@ -44,12 +47,16 @@ |
44 | 47 | # Note: This only supports 'c'. |
45 | 48 | |
46 | 49 | # usage: |
47 | -# kernel-doc [ -docbook | -html | -text | -man | -list ] [ -no-doc-sections ] | |
48 | -# [ -function funcname [ -function funcname ...] ] c file(s)s > outputfile | |
50 | +# kernel-doc [ -docbook | -html | -html5 | -text | -man | -list ] | |
51 | +# [ -no-doc-sections ] | |
52 | +# [ -function funcname [ -function funcname ...] ] | |
53 | +# c file(s)s > outputfile | |
49 | 54 | # or |
50 | -# [ -nofunction funcname [ -function funcname ...] ] c file(s)s > outputfile | |
55 | +# [ -nofunction funcname [ -function funcname ...] ] | |
56 | +# c file(s)s > outputfile | |
51 | 57 | # |
52 | -# Set output format using one of -docbook -html -text or -man. Default is man. | |
58 | +# Set output format using one of -docbook -html -html5 -text or -man. | |
59 | +# Default is man. | |
53 | 60 | # The -list format is for internal use by docproc. |
54 | 61 | # |
55 | 62 | # -no-doc-sections |
... | ... | @@ -182,6 +189,14 @@ |
182 | 189 | my $local_gt = "\\\\\\\\gt:"; |
183 | 190 | my $blankline_html = $local_lt . "p" . $local_gt; # was "<p>" |
184 | 191 | |
192 | +# html version 5 | |
193 | +my %highlights_html5 = ( $type_constant, "<span class=\"const\">\$1</span>", | |
194 | + $type_func, "<span class=\"func\">\$1</span>", | |
195 | + $type_struct_xml, "<span class=\"struct\">\$1</span>", | |
196 | + $type_env, "<span class=\"env\">\$1</span>", | |
197 | + $type_param, "<span class=\"param\">\$1</span>" ); | |
198 | +my $blankline_html5 = $local_lt . "br /" . $local_gt; | |
199 | + | |
185 | 200 | # XML, docbook format |
186 | 201 | my %highlights_xml = ( "([^=])\\\"([^\\\"<]+)\\\"", "\$1<quote>\$2</quote>", |
187 | 202 | $type_constant, "<constant>\$1</constant>", |
... | ... | @@ -311,6 +326,10 @@ |
311 | 326 | $output_mode = "html"; |
312 | 327 | %highlights = %highlights_html; |
313 | 328 | $blankline = $blankline_html; |
329 | + } elsif ($cmd eq "-html5") { | |
330 | + $output_mode = "html5"; | |
331 | + %highlights = %highlights_html5; | |
332 | + $blankline = $blankline_html5; | |
314 | 333 | } elsif ($cmd eq "-man") { |
315 | 334 | $output_mode = "man"; |
316 | 335 | %highlights = %highlights_man; |
317 | 336 | |
... | ... | @@ -353,10 +372,11 @@ |
353 | 372 | # continue execution near EOF; |
354 | 373 | |
355 | 374 | sub usage { |
356 | - print "Usage: $0 [ -v ] [ -docbook | -html | -text | -man | -list ]\n"; | |
375 | + print "Usage: $0 [ -docbook | -html | -html5 | -text | -man | -list ]\n"; | |
357 | 376 | print " [ -no-doc-sections ]\n"; |
358 | 377 | print " [ -function funcname [ -function funcname ...] ]\n"; |
359 | 378 | print " [ -nofunction funcname [ -nofunction funcname ...] ]\n"; |
379 | + print " [ -v ]\n"; | |
360 | 380 | print " c source file(s) > outputfile\n"; |
361 | 381 | print " -v : verbose output, more warnings & other info listed\n"; |
362 | 382 | exit 1; |
... | ... | @@ -450,7 +470,8 @@ |
450 | 470 | # confess "output_highlight got called with no args?\n"; |
451 | 471 | # } |
452 | 472 | |
453 | - if ($output_mode eq "html" || $output_mode eq "xml") { | |
473 | + if ($output_mode eq "html" || $output_mode eq "html5" || | |
474 | + $output_mode eq "xml") { | |
454 | 475 | $contents = local_unescape($contents); |
455 | 476 | # convert data read & converted thru xml_escape() into &xyz; format: |
456 | 477 | $contents =~ s/\\\\\\/\&/g; |
... | ... | @@ -460,6 +481,11 @@ |
460 | 481 | die $@ if $@; |
461 | 482 | # print STDERR "contents af:$contents\n"; |
462 | 483 | |
484 | +# strip whitespaces when generating html5 | |
485 | + if ($output_mode eq "html5") { | |
486 | + $contents =~ s/^\s+//; | |
487 | + $contents =~ s/\s+$//; | |
488 | + } | |
463 | 489 | foreach $line (split "\n", $contents) { |
464 | 490 | if (! $output_preformatted) { |
465 | 491 | $line =~ s/^\s*//; |
... | ... | @@ -480,7 +506,7 @@ |
480 | 506 | } |
481 | 507 | } |
482 | 508 | |
483 | -#output sections in html | |
509 | +# output sections in html | |
484 | 510 | sub output_section_html(%) { |
485 | 511 | my %args = %{$_[0]}; |
486 | 512 | my $section; |
... | ... | @@ -638,6 +664,239 @@ |
638 | 664 | print "</ul>\n"; |
639 | 665 | } |
640 | 666 | print "<hr>\n"; |
667 | +} | |
668 | + | |
669 | +# output sections in html5 | |
670 | +sub output_section_html5(%) { | |
671 | + my %args = %{$_[0]}; | |
672 | + my $section; | |
673 | + | |
674 | + foreach $section (@{$args{'sectionlist'}}) { | |
675 | + print "<section>\n"; | |
676 | + print "<h1>$section</h1>\n"; | |
677 | + print "<p>\n"; | |
678 | + output_highlight($args{'sections'}{$section}); | |
679 | + print "</p>\n"; | |
680 | + print "</section>\n"; | |
681 | + } | |
682 | +} | |
683 | + | |
684 | +# output enum in html5 | |
685 | +sub output_enum_html5(%) { | |
686 | + my %args = %{$_[0]}; | |
687 | + my ($parameter); | |
688 | + my $count; | |
689 | + my $html5id; | |
690 | + | |
691 | + $html5id = $args{'enum'}; | |
692 | + $html5id =~ s/[^a-zA-Z0-9\-]+/_/g; | |
693 | + print "<article class=\"enum\" id=\"enum:". $html5id . "\">"; | |
694 | + print "<h1>enum " . $args{'enum'} . "</h1>\n"; | |
695 | + print "<ol class=\"code\">\n"; | |
696 | + print "<li>"; | |
697 | + print "<span class=\"keyword\">enum</span> "; | |
698 | + print "<span class=\"identifier\">" . $args{'enum'} . "</span> {"; | |
699 | + print "</li>\n"; | |
700 | + $count = 0; | |
701 | + foreach $parameter (@{$args{'parameterlist'}}) { | |
702 | + print "<li class=\"indent\">"; | |
703 | + print "<span class=\"param\">" . $parameter . "</span>"; | |
704 | + if ($count != $#{$args{'parameterlist'}}) { | |
705 | + $count++; | |
706 | + print ","; | |
707 | + } | |
708 | + print "</li>\n"; | |
709 | + } | |
710 | + print "<li>};</li>\n"; | |
711 | + print "</ol>\n"; | |
712 | + | |
713 | + print "<section>\n"; | |
714 | + print "<h1>Constants</h1>\n"; | |
715 | + print "<dl>\n"; | |
716 | + foreach $parameter (@{$args{'parameterlist'}}) { | |
717 | + print "<dt>" . $parameter . "</dt>\n"; | |
718 | + print "<dd>"; | |
719 | + output_highlight($args{'parameterdescs'}{$parameter}); | |
720 | + print "</dd>\n"; | |
721 | + } | |
722 | + print "</dl>\n"; | |
723 | + print "</section>\n"; | |
724 | + output_section_html5(@_); | |
725 | + print "</article>\n"; | |
726 | +} | |
727 | + | |
728 | +# output typedef in html5 | |
729 | +sub output_typedef_html5(%) { | |
730 | + my %args = %{$_[0]}; | |
731 | + my ($parameter); | |
732 | + my $count; | |
733 | + my $html5id; | |
734 | + | |
735 | + $html5id = $args{'typedef'}; | |
736 | + $html5id =~ s/[^a-zA-Z0-9\-]+/_/g; | |
737 | + print "<article class=\"typedef\" id=\"typedef:" . $html5id . "\">\n"; | |
738 | + print "<h1>typedef " . $args{'typedef'} . "</h1>\n"; | |
739 | + | |
740 | + print "<ol class=\"code\">\n"; | |
741 | + print "<li>"; | |
742 | + print "<span class=\"keyword\">typedef</span> "; | |
743 | + print "<span class=\"identifier\">" . $args{'typedef'} . "</span>"; | |
744 | + print "</li>\n"; | |
745 | + print "</ol>\n"; | |
746 | + output_section_html5(@_); | |
747 | + print "</article>\n"; | |
748 | +} | |
749 | + | |
750 | +# output struct in html5 | |
751 | +sub output_struct_html5(%) { | |
752 | + my %args = %{$_[0]}; | |
753 | + my ($parameter); | |
754 | + my $html5id; | |
755 | + | |
756 | + $html5id = $args{'struct'}; | |
757 | + $html5id =~ s/[^a-zA-Z0-9\-]+/_/g; | |
758 | + print "<article class=\"struct\" id=\"struct:" . $html5id . "\">\n"; | |
759 | + print "<hgroup>\n"; | |
760 | + print "<h1>" . $args{'type'} . " " . $args{'struct'} . "</h1>"; | |
761 | + print "<h2>". $args{'purpose'} . "</h2>\n"; | |
762 | + print "</hgroup>\n"; | |
763 | + print "<ol class=\"code\">\n"; | |
764 | + print "<li>"; | |
765 | + print "<span class=\"type\">" . $args{'type'} . "</span> "; | |
766 | + print "<span class=\"identifier\">" . $args{'struct'} . "</span> {"; | |
767 | + print "</li>\n"; | |
768 | + foreach $parameter (@{$args{'parameterlist'}}) { | |
769 | + print "<li class=\"indent\">"; | |
770 | + if ($parameter =~ /^#/) { | |
771 | + print "<span class=\"param\">" . $parameter ."</span>\n"; | |
772 | + print "</li>\n"; | |
773 | + next; | |
774 | + } | |
775 | + my $parameter_name = $parameter; | |
776 | + $parameter_name =~ s/\[.*//; | |
777 | + | |
778 | + ($args{'parameterdescs'}{$parameter_name} ne $undescribed) || next; | |
779 | + $type = $args{'parametertypes'}{$parameter}; | |
780 | + if ($type =~ m/([^\(]*\(\*)\s*\)\s*\(([^\)]*)\)/) { | |
781 | + # pointer-to-function | |
782 | + print "<span class=\"type\">$1</span> "; | |
783 | + print "<span class=\"param\">$parameter</span>"; | |
784 | + print "<span class=\"type\">)</span> "; | |
785 | + print "(<span class=\"args\">$2</span>);"; | |
786 | + } elsif ($type =~ m/^(.*?)\s*(:.*)/) { | |
787 | + # bitfield | |
788 | + print "<span class=\"type\">$1</span> "; | |
789 | + print "<span class=\"param\">$parameter</span>"; | |
790 | + print "<span class=\"bits\">$2</span>;"; | |
791 | + } else { | |
792 | + print "<span class=\"type\">$type</span> "; | |
793 | + print "<span class=\"param\">$parameter</span>;"; | |
794 | + } | |
795 | + print "</li>\n"; | |
796 | + } | |
797 | + print "<li>};</li>\n"; | |
798 | + print "</ol>\n"; | |
799 | + | |
800 | + print "<section>\n"; | |
801 | + print "<h1>Members</h1>\n"; | |
802 | + print "<dl>\n"; | |
803 | + foreach $parameter (@{$args{'parameterlist'}}) { | |
804 | + ($parameter =~ /^#/) && next; | |
805 | + | |
806 | + my $parameter_name = $parameter; | |
807 | + $parameter_name =~ s/\[.*//; | |
808 | + | |
809 | + ($args{'parameterdescs'}{$parameter_name} ne $undescribed) || next; | |
810 | + print "<dt>" . $parameter . "</dt>\n"; | |
811 | + print "<dd>"; | |
812 | + output_highlight($args{'parameterdescs'}{$parameter_name}); | |
813 | + print "</dd>\n"; | |
814 | + } | |
815 | + print "</dl>\n"; | |
816 | + print "</section>\n"; | |
817 | + output_section_html5(@_); | |
818 | + print "</article>\n"; | |
819 | +} | |
820 | + | |
821 | +# output function in html5 | |
822 | +sub output_function_html5(%) { | |
823 | + my %args = %{$_[0]}; | |
824 | + my ($parameter, $section); | |
825 | + my $count; | |
826 | + my $html5id; | |
827 | + | |
828 | + $html5id = $args{'function'}; | |
829 | + $html5id =~ s/[^a-zA-Z0-9\-]+/_/g; | |
830 | + print "<article class=\"function\" id=\"func:". $html5id . "\">\n"; | |
831 | + print "<hgroup>\n"; | |
832 | + print "<h1>" . $args{'function'} . "</h1>"; | |
833 | + print "<h2>" . $args{'purpose'} . "</h2>\n"; | |
834 | + print "</hgroup>\n"; | |
835 | + print "<ol class=\"code\">\n"; | |
836 | + print "<li>"; | |
837 | + print "<span class=\"type\">" . $args{'functiontype'} . "</span> "; | |
838 | + print "<span class=\"identifier\">" . $args{'function'} . "</span> ("; | |
839 | + print "</li>"; | |
840 | + $count = 0; | |
841 | + foreach $parameter (@{$args{'parameterlist'}}) { | |
842 | + print "<li class=\"indent\">"; | |
843 | + $type = $args{'parametertypes'}{$parameter}; | |
844 | + if ($type =~ m/([^\(]*\(\*)\s*\)\s*\(([^\)]*)\)/) { | |
845 | + # pointer-to-function | |
846 | + print "<span class=\"type\">$1</span> "; | |
847 | + print "<span class=\"param\">$parameter</span>"; | |
848 | + print "<span class=\"type\">)</span> "; | |
849 | + print "(<span class=\"args\">$2</span>)"; | |
850 | + } else { | |
851 | + print "<span class=\"type\">$type</span> "; | |
852 | + print "<span class=\"param\">$parameter</span>"; | |
853 | + } | |
854 | + if ($count != $#{$args{'parameterlist'}}) { | |
855 | + $count++; | |
856 | + print ","; | |
857 | + } | |
858 | + print "</li>\n"; | |
859 | + } | |
860 | + print "<li>)</li>\n"; | |
861 | + print "</ol>\n"; | |
862 | + | |
863 | + print "<section>\n"; | |
864 | + print "<h1>Arguments</h1>\n"; | |
865 | + print "<p>\n"; | |
866 | + print "<dl>\n"; | |
867 | + foreach $parameter (@{$args{'parameterlist'}}) { | |
868 | + my $parameter_name = $parameter; | |
869 | + $parameter_name =~ s/\[.*//; | |
870 | + | |
871 | + ($args{'parameterdescs'}{$parameter_name} ne $undescribed) || next; | |
872 | + print "<dt>" . $parameter . "</dt>\n"; | |
873 | + print "<dd>"; | |
874 | + output_highlight($args{'parameterdescs'}{$parameter_name}); | |
875 | + print "</dd>\n"; | |
876 | + } | |
877 | + print "</dl>\n"; | |
878 | + print "</section>\n"; | |
879 | + output_section_html5(@_); | |
880 | + print "</article>\n"; | |
881 | +} | |
882 | + | |
883 | +# output DOC: block header in html5 | |
884 | +sub output_blockhead_html5(%) { | |
885 | + my %args = %{$_[0]}; | |
886 | + my ($parameter, $section); | |
887 | + my $count; | |
888 | + my $html5id; | |
889 | + | |
890 | + foreach $section (@{$args{'sectionlist'}}) { | |
891 | + $html5id = $section; | |
892 | + $html5id =~ s/[^a-zA-Z0-9\-]+/_/g; | |
893 | + print "<article class=\"doc\" id=\"doc:". $html5id . "\">\n"; | |
894 | + print "<h1>$section</h1>\n"; | |
895 | + print "<p>\n"; | |
896 | + output_highlight($args{'sections'}{$section}); | |
897 | + print "</p>\n"; | |
898 | + } | |
899 | + print "</article>\n"; | |
641 | 900 | } |
642 | 901 | |
643 | 902 | sub output_section_xml(%) { |
scripts/tags.sh
... | ... | @@ -154,7 +154,9 @@ |
154 | 154 | --regex-c++='/__CLEARPAGEFLAG_NOOP\(([^,)]*).*/__ClearPage\1/' \ |
155 | 155 | --regex-c++='/TESTCLEARFLAG_FALSE\(([^,)]*).*/TestClearPage\1/' \ |
156 | 156 | --regex-c++='/__TESTCLEARFLAG_FALSE\(([^,)]*).*/__TestClearPage\1/' \ |
157 | - --regex-c++='/_PE\(([^,)]*).*/PEVENT_ERRNO__\1/' | |
157 | + --regex-c++='/_PE\(([^,)]*).*/PEVENT_ERRNO__\1/' \ | |
158 | + --regex-c='/PCI_OP_READ\(([a-z]*[a-z]).*[1-4]\)/pci_bus_read_config_\1/' \ | |
159 | + --regex-c='/PCI_OP_WRITE\(([a-z]*[a-z]).*[1-4]\)/pci_bus_write_config_\1/' | |
158 | 160 | |
159 | 161 | all_kconfigs | xargs $1 -a \ |
160 | 162 | --langdef=kconfig --language-force=kconfig \ |
... | ... | @@ -197,7 +199,9 @@ |
197 | 199 | --regex='/__CLEARPAGEFLAG_NOOP\(([^,)]*).*/__ClearPage\1/' \ |
198 | 200 | --regex='/TESTCLEARFLAG_FALSE\(([^,)]*).*/TestClearPage\1/' \ |
199 | 201 | --regex='/__TESTCLEARFLAG_FALSE\(([^,)]*).*/__TestClearPage\1/' \ |
200 | - --regex='/_PE\(([^,)]*).*/PEVENT_ERRNO__\1/' | |
202 | + --regex='/_PE\(([^,)]*).*/PEVENT_ERRNO__\1/' \ | |
203 | + --regex='/PCI_OP_READ\(([a-z]*[a-z]).*[1-4]\)/pci_bus_read_config_\1/' \ | |
204 | + --regex='/PCI_OP_WRITE\(([a-z]*[a-z]).*[1-4]\)/pci_bus_write_config_\1/' | |
201 | 205 | |
202 | 206 | all_kconfigs | xargs $1 -a \ |
203 | 207 | --regex='/^[ \t]*\(\(menu\)*config\)[ \t]+\([a-zA-Z0-9_]+\)/\3/' |