diff options
| author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-01-11 10:28:19 -0500 |
|---|---|---|
| committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-01-11 10:28:19 -0500 |
| commit | 734d1ece37fbf3d2ddfc71bc6c69e0fe35f02542 (patch) | |
| tree | c4805dd7e746b1feb9e09e9849f3245d0b2c0c6b /scripts/kernel-doc | |
| parent | 216c82c6aba63eeb49d7654b448e0d47bea255bb (diff) | |
| parent | 9931faca02c604c22335f5a935a501bb2ace6e20 (diff) | |
Merge tag 'v3.8-rc3' into v4l_for_linus
Linux 3.8-rc3
* tag 'v3.8-rc3': (11110 commits)
Linux 3.8-rc3
mm: reinstante dropped pmd_trans_splitting() check
cred: Remove tgcred pointer from struct cred
drm/ttm: fix fence locking in ttm_buffer_object_transfer
ARM: clps711x: Fix bad merge of clockevents setup
ARM: highbank: save and restore L2 cache and GIC on suspend
ARM: highbank: add a power request clear
ARM: highbank: fix secondary boot and hotplug
ARM: highbank: fix typos with hignbank in power request functions
ARM: dts: fix highbank cpu mpidr values
ARM: dts: add device_type prop to cpu nodes on Calxeda platforms
drm/prime: drop reference on imported dma-buf come from gem
xen/netfront: improve truesize tracking
ARM: mx5: Fix MX53 flexcan2 clock
ARM: OMAP2+: am33xx-hwmod: Fix wrongly terminated am33xx_usbss_mpu_irqs array
sctp: fix Kconfig bug in default cookie hmac selection
EDAC: Cleanup device deregistering path
EDAC: Fix EDAC Kconfig menu
EDAC: Fix kernel panic on module unloading
ALSA: hda - add mute LED for HP Pavilion 17 (Realtek codec)
...
Diffstat (limited to 'scripts/kernel-doc')
| -rwxr-xr-x | scripts/kernel-doc | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/scripts/kernel-doc b/scripts/kernel-doc index 46e7aff80d1a..f565536a2bef 100755 --- a/scripts/kernel-doc +++ b/scripts/kernel-doc | |||
| @@ -137,6 +137,8 @@ use strict; | |||
| 137 | # should document the "Context:" of the function, e.g. whether the functions | 137 | # should document the "Context:" of the function, e.g. whether the functions |
| 138 | # can be called form interrupts. Unlike other sections you can end it with an | 138 | # can be called form interrupts. Unlike other sections you can end it with an |
| 139 | # empty line. | 139 | # empty line. |
| 140 | # A non-void function should have a "Return:" section describing the return | ||
| 141 | # value(s). | ||
| 140 | # Example-sections should contain the string EXAMPLE so that they are marked | 142 | # Example-sections should contain the string EXAMPLE so that they are marked |
| 141 | # appropriately in DocBook. | 143 | # appropriately in DocBook. |
| 142 | # | 144 | # |
| @@ -315,6 +317,7 @@ my $section_default = "Description"; # default section | |||
| 315 | my $section_intro = "Introduction"; | 317 | my $section_intro = "Introduction"; |
| 316 | my $section = $section_default; | 318 | my $section = $section_default; |
| 317 | my $section_context = "Context"; | 319 | my $section_context = "Context"; |
| 320 | my $section_return = "Return"; | ||
| 318 | 321 | ||
| 319 | my $undescribed = "-- undescribed --"; | 322 | my $undescribed = "-- undescribed --"; |
| 320 | 323 | ||
| @@ -2039,6 +2042,28 @@ sub check_sections($$$$$$) { | |||
| 2039 | } | 2042 | } |
| 2040 | 2043 | ||
| 2041 | ## | 2044 | ## |
| 2045 | # Checks the section describing the return value of a function. | ||
| 2046 | sub check_return_section { | ||
| 2047 | my $file = shift; | ||
| 2048 | my $declaration_name = shift; | ||
| 2049 | my $return_type = shift; | ||
| 2050 | |||
| 2051 | # Ignore an empty return type (It's a macro) | ||
| 2052 | # Ignore functions with a "void" return type. (But don't ignore "void *") | ||
| 2053 | if (($return_type eq "") || ($return_type =~ /void\s*\w*\s*$/)) { | ||
| 2054 | return; | ||
| 2055 | } | ||
| 2056 | |||
| 2057 | if (!defined($sections{$section_return}) || | ||
| 2058 | $sections{$section_return} eq "") { | ||
| 2059 | print STDERR "Warning(${file}:$.): " . | ||
| 2060 | "No description found for return value of " . | ||
| 2061 | "'$declaration_name'\n"; | ||
| 2062 | ++$warnings; | ||
| 2063 | } | ||
| 2064 | } | ||
| 2065 | |||
| 2066 | ## | ||
| 2042 | # takes a function prototype and the name of the current file being | 2067 | # takes a function prototype and the name of the current file being |
| 2043 | # processed and spits out all the details stored in the global | 2068 | # processed and spits out all the details stored in the global |
| 2044 | # arrays/hashes. | 2069 | # arrays/hashes. |
| @@ -2054,7 +2079,6 @@ sub dump_function($$) { | |||
| 2054 | $prototype =~ s/^__inline +//; | 2079 | $prototype =~ s/^__inline +//; |
| 2055 | $prototype =~ s/^__always_inline +//; | 2080 | $prototype =~ s/^__always_inline +//; |
| 2056 | $prototype =~ s/^noinline +//; | 2081 | $prototype =~ s/^noinline +//; |
| 2057 | $prototype =~ s/__devinit +//; | ||
| 2058 | $prototype =~ s/__init +//; | 2082 | $prototype =~ s/__init +//; |
| 2059 | $prototype =~ s/__init_or_module +//; | 2083 | $prototype =~ s/__init_or_module +//; |
| 2060 | $prototype =~ s/__must_check +//; | 2084 | $prototype =~ s/__must_check +//; |
| @@ -2109,6 +2133,15 @@ sub dump_function($$) { | |||
| 2109 | my $prms = join " ", @parameterlist; | 2133 | my $prms = join " ", @parameterlist; |
| 2110 | check_sections($file, $declaration_name, "function", $sectcheck, $prms, ""); | 2134 | check_sections($file, $declaration_name, "function", $sectcheck, $prms, ""); |
| 2111 | 2135 | ||
| 2136 | # This check emits a lot of warnings at the moment, because many | ||
| 2137 | # functions don't have a 'Return' doc section. So until the number | ||
| 2138 | # of warnings goes sufficiently down, the check is only performed in | ||
| 2139 | # verbose mode. | ||
| 2140 | # TODO: always perform the check. | ||
| 2141 | if ($verbose) { | ||
| 2142 | check_return_section($file, $declaration_name, $return_type); | ||
| 2143 | } | ||
| 2144 | |||
| 2112 | output_declaration($declaration_name, | 2145 | output_declaration($declaration_name, |
| 2113 | 'function', | 2146 | 'function', |
| 2114 | {'function' => $declaration_name, | 2147 | {'function' => $declaration_name, |
