aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/gfp-translate7
-rwxr-xr-xscripts/kernel-doc12
2 files changed, 15 insertions, 4 deletions
diff --git a/scripts/gfp-translate b/scripts/gfp-translate
index d81b968d864e..c9230e158a8f 100644
--- a/scripts/gfp-translate
+++ b/scripts/gfp-translate
@@ -63,7 +63,12 @@ fi
63 63
64# Extract GFP flags from the kernel source 64# Extract GFP flags from the kernel source
65TMPFILE=`mktemp -t gfptranslate-XXXXXX` || exit 1 65TMPFILE=`mktemp -t gfptranslate-XXXXXX` || exit 1
66grep "^#define __GFP" $SOURCE/include/linux/gfp.h | sed -e 's/(__force gfp_t)//' | sed -e 's/u)/)/' | grep -v GFP_BITS | sed -e 's/)\//) \//' > $TMPFILE 66grep -q ___GFP $SOURCE/include/linux/gfp.h
67if [ $? -eq 0 ]; then
68 grep "^#define ___GFP" $SOURCE/include/linux/gfp.h | sed -e 's/u$//' | grep -v GFP_BITS > $TMPFILE
69else
70 grep "^#define __GFP" $SOURCE/include/linux/gfp.h | sed -e 's/(__force gfp_t)//' | sed -e 's/u)/)/' | grep -v GFP_BITS | sed -e 's/)\//) \//' > $TMPFILE
71fi
67 72
68# Parse the flags 73# Parse the flags
69IFS=" 74IFS="
diff --git a/scripts/kernel-doc b/scripts/kernel-doc
index cdb6dc1f6458..39580a5dc5df 100755
--- a/scripts/kernel-doc
+++ b/scripts/kernel-doc
@@ -5,7 +5,7 @@ use strict;
5## Copyright (c) 1998 Michael Zucchi, All Rights Reserved ## 5## Copyright (c) 1998 Michael Zucchi, All Rights Reserved ##
6## Copyright (C) 2000, 1 Tim Waugh <twaugh@redhat.com> ## 6## Copyright (C) 2000, 1 Tim Waugh <twaugh@redhat.com> ##
7## Copyright (C) 2001 Simon Huggins ## 7## Copyright (C) 2001 Simon Huggins ##
8## Copyright (C) 2005-2009 Randy Dunlap ## 8## Copyright (C) 2005-2010 Randy Dunlap ##
9## ## 9## ##
10## #define enhancements by Armin Kuster <akuster@mvista.com> ## 10## #define enhancements by Armin Kuster <akuster@mvista.com> ##
11## Copyright (c) 2000 MontaVista Software, Inc. ## 11## Copyright (c) 2000 MontaVista Software, Inc. ##
@@ -453,7 +453,7 @@ sub output_highlight {
453 if ($output_mode eq "html" || $output_mode eq "xml") { 453 if ($output_mode eq "html" || $output_mode eq "xml") {
454 $contents = local_unescape($contents); 454 $contents = local_unescape($contents);
455 # convert data read & converted thru xml_escape() into &xyz; format: 455 # convert data read & converted thru xml_escape() into &xyz; format:
456 $contents =~ s/\\\\\\/&/g; 456 $contents =~ s/\\\\\\/\&/g;
457 } 457 }
458# print STDERR "contents b4:$contents\n"; 458# print STDERR "contents b4:$contents\n";
459 eval $dohighlight; 459 eval $dohighlight;
@@ -770,7 +770,11 @@ sub output_struct_xml(%) {
770 print $args{'type'} . " " . $args{'struct'} . " {\n"; 770 print $args{'type'} . " " . $args{'struct'} . " {\n";
771 foreach $parameter (@{$args{'parameterlist'}}) { 771 foreach $parameter (@{$args{'parameterlist'}}) {
772 if ($parameter =~ /^#/) { 772 if ($parameter =~ /^#/) {
773 print "$parameter\n"; 773 my $prm = $parameter;
774 # convert data read & converted thru xml_escape() into &xyz; format:
775 # This allows us to have #define macros interspersed in a struct.
776 $prm =~ s/\\\\\\/\&/g;
777 print "$prm\n";
774 next; 778 next;
775 } 779 }
776 780
@@ -1701,6 +1705,8 @@ sub push_parameter($$$) {
1701 } 1705 }
1702 } 1706 }
1703 1707
1708 $param = xml_escape($param);
1709
1704 # strip spaces from $param so that it is one continous string 1710 # strip spaces from $param so that it is one continous string
1705 # on @parameterlist; 1711 # on @parameterlist;
1706 # this fixes a problem where check_sections() cannot find 1712 # this fixes a problem where check_sections() cannot find