aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/kernel-doc
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/kernel-doc')
-rwxr-xr-xscripts/kernel-doc22
1 files changed, 22 insertions, 0 deletions
diff --git a/scripts/kernel-doc b/scripts/kernel-doc
index 0f11870116dc..2b53a55fbece 100755
--- a/scripts/kernel-doc
+++ b/scripts/kernel-doc
@@ -1827,6 +1827,25 @@ sub reset_state {
1827 $state = 0; 1827 $state = 0;
1828} 1828}
1829 1829
1830sub tracepoint_munge($) {
1831 my $file = shift;
1832 my $tracepointname = 0;
1833 my $tracepointargs = 0;
1834
1835 if($prototype =~ m/TRACE_EVENT\((.*?),/) {
1836 $tracepointname = $1;
1837 }
1838 if($prototype =~ m/TP_PROTO\((.*?)\)/) {
1839 $tracepointargs = $1;
1840 }
1841 if (($tracepointname eq 0) || ($tracepointargs eq 0)) {
1842 print STDERR "Warning(${file}:$.): Unrecognized tracepoint format: \n".
1843 "$prototype\n";
1844 } else {
1845 $prototype = "static inline void trace_$tracepointname($tracepointargs)";
1846 }
1847}
1848
1830sub syscall_munge() { 1849sub syscall_munge() {
1831 my $void = 0; 1850 my $void = 0;
1832 1851
@@ -1881,6 +1900,9 @@ sub process_state3_function($$) {
1881 if ($prototype =~ /SYSCALL_DEFINE/) { 1900 if ($prototype =~ /SYSCALL_DEFINE/) {
1882 syscall_munge(); 1901 syscall_munge();
1883 } 1902 }
1903 if ($prototype =~ /TRACE_EVENT/) {
1904 tracepoint_munge($file);
1905 }
1884 dump_function($prototype, $file); 1906 dump_function($prototype, $file);
1885 reset_state(); 1907 reset_state();
1886 } 1908 }