aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/Makefile.headersinst2
-rw-r--r--scripts/kconfig/qconf.cc3
-rwxr-xr-xscripts/kernel-doc17
-rw-r--r--scripts/mod/modpost.c27
4 files changed, 43 insertions, 6 deletions
diff --git a/scripts/Makefile.headersinst b/scripts/Makefile.headersinst
index 4241e0dfeeaf..f7b6705fd6a3 100644
--- a/scripts/Makefile.headersinst
+++ b/scripts/Makefile.headersinst
@@ -109,7 +109,7 @@ quiet_cmd_mkdir = MKDIR $(patsubst $(INSTALL_HDR_PATH)/%,%,$@)
109quiet_cmd_gen = GEN $(patsubst $(INSTALL_HDR_PATH)/%,%,$@) 109quiet_cmd_gen = GEN $(patsubst $(INSTALL_HDR_PATH)/%,%,$@)
110 cmd_gen = \ 110 cmd_gen = \
111FNAME=$(patsubst $(INSTALL_HDR_PATH)/$(_dst)/%,%,$@) \ 111FNAME=$(patsubst $(INSTALL_HDR_PATH)/$(_dst)/%,%,$@) \
112STUBDEF=__ASM_STUB_`echo $$FNAME | tr a-z. A-Z_`; \ 112STUBDEF=__ASM_STUB_`echo $$FNAME | tr a-z.- A-Z__`; \
113(echo "/* File autogenerated by 'make headers_install' */" ; \ 113(echo "/* File autogenerated by 'make headers_install' */" ; \
114echo "\#ifndef $$STUBDEF" ; \ 114echo "\#ifndef $$STUBDEF" ; \
115echo "\#define $$STUBDEF" ; \ 115echo "\#define $$STUBDEF" ; \
diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
index 0b2fcc417f59..c0ae0a7ddb42 100644
--- a/scripts/kconfig/qconf.cc
+++ b/scripts/kconfig/qconf.cc
@@ -917,7 +917,7 @@ void ConfigView::updateListAll(void)
917} 917}
918 918
919ConfigInfoView::ConfigInfoView(QWidget* parent, const char *name) 919ConfigInfoView::ConfigInfoView(QWidget* parent, const char *name)
920 : Parent(parent, name), menu(0) 920 : Parent(parent, name), menu(0), sym(0)
921{ 921{
922 if (name) { 922 if (name) {
923 configSettings->beginGroup(name); 923 configSettings->beginGroup(name);
@@ -953,6 +953,7 @@ void ConfigInfoView::setInfo(struct menu *m)
953 if (menu == m) 953 if (menu == m)
954 return; 954 return;
955 menu = m; 955 menu = m;
956 sym = NULL;
956 if (!menu) 957 if (!menu)
957 clear(); 958 clear();
958 else 959 else
diff --git a/scripts/kernel-doc b/scripts/kernel-doc
index df3b272f7ce6..f50a70f550b3 100755
--- a/scripts/kernel-doc
+++ b/scripts/kernel-doc
@@ -1469,6 +1469,7 @@ sub push_parameter($$$) {
1469 my $param = shift; 1469 my $param = shift;
1470 my $type = shift; 1470 my $type = shift;
1471 my $file = shift; 1471 my $file = shift;
1472 my $anon = 0;
1472 1473
1473 my $param_name = $param; 1474 my $param_name = $param;
1474 $param_name =~ s/\[.*//; 1475 $param_name =~ s/\[.*//;
@@ -1484,9 +1485,20 @@ sub push_parameter($$$) {
1484 $param="void"; 1485 $param="void";
1485 $parameterdescs{void} = "no arguments"; 1486 $parameterdescs{void} = "no arguments";
1486 } 1487 }
1488 elsif ($type eq "" && ($param eq "struct" or $param eq "union"))
1489 # handle unnamed (anonymous) union or struct:
1490 {
1491 $type = $param;
1492 $param = "{unnamed_" . $param. "}";
1493 $parameterdescs{$param} = "anonymous\n";
1494 $anon = 1;
1495 }
1496
1487 # warn if parameter has no description 1497 # warn if parameter has no description
1488 # (but ignore ones starting with # as these are no parameters 1498 # (but ignore ones starting with # as these are not parameters
1489 # but inline preprocessor statements 1499 # but inline preprocessor statements);
1500 # also ignore unnamed structs/unions;
1501 if (!$anon) {
1490 if (!defined $parameterdescs{$param_name} && $param_name !~ /^#/) { 1502 if (!defined $parameterdescs{$param_name} && $param_name !~ /^#/) {
1491 1503
1492 $parameterdescs{$param_name} = $undescribed; 1504 $parameterdescs{$param_name} = $undescribed;
@@ -1500,6 +1512,7 @@ sub push_parameter($$$) {
1500 " No description found for parameter '$param'\n"; 1512 " No description found for parameter '$param'\n";
1501 ++$warnings; 1513 ++$warnings;
1502 } 1514 }
1515 }
1503 1516
1504 push @parameterlist, $param; 1517 push @parameterlist, $param;
1505 $parametertypes{$param} = $type; 1518 $parametertypes{$param} = $type;
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index 15ab5d02e80a..2aa47623f5f8 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -582,9 +582,19 @@ static int strrcmp(const char *s, const char *sub)
582 * tosec = .init.text | .exit.text | .init.data 582 * tosec = .init.text | .exit.text | .init.data
583 * fromsec = .data 583 * fromsec = .data
584 * atsym = *driver, *_template, *_sht, *_ops, *_probe, *probe_one 584 * atsym = *driver, *_template, *_sht, *_ops, *_probe, *probe_one
585 *
586 * Pattern 3:
587 * Some symbols belong to init section but still it is ok to reference
588 * these from non-init sections as these symbols don't have any memory
589 * allocated for them and symbol address and value are same. So even
590 * if init section is freed, its ok to reference those symbols.
591 * For ex. symbols marking the init section boundaries.
592 * This pattern is identified by
593 * refsymname = __init_begin, _sinittext, _einittext
585 **/ 594 **/
586static int secref_whitelist(const char *modname, const char *tosec, 595static int secref_whitelist(const char *modname, const char *tosec,
587 const char *fromsec, const char *atsym) 596 const char *fromsec, const char *atsym,
597 const char *refsymname)
588{ 598{
589 int f1 = 1, f2 = 1; 599 int f1 = 1, f2 = 1;
590 const char **s; 600 const char **s;
@@ -595,6 +605,14 @@ static int secref_whitelist(const char *modname, const char *tosec,
595 "_ops", 605 "_ops",
596 "_probe", 606 "_probe",
597 "_probe_one", 607 "_probe_one",
608 "_console",
609 NULL
610 };
611
612 const char *pat3refsym[] = {
613 "__init_begin",
614 "_sinittext",
615 "_einittext",
598 NULL 616 NULL
599 }; 617 };
600 618
@@ -628,6 +646,11 @@ static int secref_whitelist(const char *modname, const char *tosec,
628 if ((strcmp(fromsec, ".pci_fixup") == 0) && 646 if ((strcmp(fromsec, ".pci_fixup") == 0) &&
629 (strcmp(tosec, ".init.text") == 0)) 647 (strcmp(tosec, ".init.text") == 0))
630 return 1; 648 return 1;
649
650 /* Check for pattern 3 */
651 for (s = pat3refsym; *s; s++)
652 if (strcmp(refsymname, *s) == 0)
653 return 1;
631 } 654 }
632 return 0; 655 return 0;
633} 656}
@@ -737,7 +760,7 @@ static void warn_sec_mismatch(const char *modname, const char *fromsec,
737 /* check whitelist - we may ignore it */ 760 /* check whitelist - we may ignore it */
738 if (before && 761 if (before &&
739 secref_whitelist(modname, secname, fromsec, 762 secref_whitelist(modname, secname, fromsec,
740 elf->strtab + before->st_name)) 763 elf->strtab + before->st_name, refsymname))
741 return; 764 return;
742 765
743 if (before && after) { 766 if (before && after) {