summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-06-20 10:19:49 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2009-06-20 10:19:49 -0700
commitad5cf46b4e3b29f2bc08543e8ef0bf8b13d3f19e (patch)
tree302266c69730de99546f1f5020e9fe134a0b47bf
parent93db6294958f62643a917e44d1abc85440e600cf (diff)
parente34e7dbb35474ffc75f639eca64a18a15f4f8688 (diff)
downloadop-kernel-dev-ad5cf46b4e3b29f2bc08543e8ef0bf8b13d3f19e.zip
op-kernel-dev-ad5cf46b4e3b29f2bc08543e8ef0bf8b13d3f19e.tar.gz
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes: kernel-doc: fix param matching for array params kernel-doc: ignore kmemcheck_bitfield_begin/end kallsyms: fix inverted valid symbol checking kbuild: fix build error during make htmldocs
-rw-r--r--scripts/basic/docproc.c2
-rw-r--r--scripts/kallsyms.c6
-rwxr-xr-xscripts/kernel-doc19
3 files changed, 23 insertions, 4 deletions
diff --git a/scripts/basic/docproc.c b/scripts/basic/docproc.c
index 4c9523e..99ca7a6 100644
--- a/scripts/basic/docproc.c
+++ b/scripts/basic/docproc.c
@@ -385,7 +385,7 @@ int main(int argc, char *argv[])
if (!srctree)
srctree = getcwd(NULL, 0);
kernsrctree = getenv("KBUILD_SRC");
- if (!kernsrctree)
+ if (!kernsrctree || !*kernsrctree)
kernsrctree = srctree;
if (argc != 3) {
usage();
diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c
index 3cb5789..64343cc 100644
--- a/scripts/kallsyms.c
+++ b/scripts/kallsyms.c
@@ -167,11 +167,11 @@ static int symbol_valid_tr(struct sym_entry *s)
for (i = 0; i < ARRAY_SIZE(text_ranges); ++i) {
tr = &text_ranges[i];
- if (s->addr >= tr->start && s->addr < tr->end)
- return 0;
+ if (s->addr >= tr->start && s->addr <= tr->end)
+ return 1;
}
- return 1;
+ return 0;
}
static int symbol_valid(struct sym_entry *s)
diff --git a/scripts/kernel-doc b/scripts/kernel-doc
index a193fa3..ed591e9 100755
--- a/scripts/kernel-doc
+++ b/scripts/kernel-doc
@@ -1468,6 +1468,8 @@ sub dump_enum($$) {
}
}
+ # strip kmemcheck_bitfield_{begin,end}.*;
+ $members =~ s/kmemcheck_bitfield_.*?;//gos;
output_declaration($declaration_name,
'enum',
@@ -1651,6 +1653,15 @@ sub push_parameter($$$) {
}
}
+ # strip spaces from $param so that it is one continous string
+ # on @parameterlist;
+ # this fixes a problem where check_sections() cannot find
+ # a parameter like "addr[6 + 2]" because it actually appears
+ # as "addr[6", "+", "2]" on the parameter list;
+ # but it's better to maintain the param string unchanged for output,
+ # so just weaken the string compare in check_sections() to ignore
+ # "[blah" in a parameter string;
+ ###$param =~ s/\s*//g;
push @parameterlist, $param;
$parametertypes{$param} = $type;
}
@@ -1669,6 +1680,14 @@ sub check_sections($$$$$$) {
$prm_clean = $prms[$px];
$prm_clean =~ s/\[.*\]//;
$prm_clean =~ s/__attribute__\s*\(\([a-z,_\*\s\(\)]*\)\)//;
+ # ignore array size in a parameter string;
+ # however, the original param string may contain
+ # spaces, e.g.: addr[6 + 2]
+ # and this appears in @prms as "addr[6" since the
+ # parameter list is split at spaces;
+ # hence just ignore "[..." for the sections check;
+ $prm_clean =~ s/\[.*//;
+
##$prm_clean =~ s/^\**//;
if ($prm_clean eq $sects[$sx]) {
$err = 0;
OpenPOWER on IntegriCloud