summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorYann E. MORIN <yann.morin.1998@free.fr>2013-08-06 12:45:07 -0400
committerYann E. MORIN <yann.morin.1998@free.fr>2013-08-15 16:48:08 -0400
commit04b19b773a60d201bc1b187ba7a7c86dc237a27b (patch)
tree258777513e409ba42fe9b592461bfa05504dd24c /scripts
parent83e8b90e1d2cc5ff5d2443f2486c2d786a4997ce (diff)
kconfig: silence warning when parsing auto.conf when a symbol has changed type
When a symbol changes type from tristate to bool, and was previously set to 'm', a subsequent silentoldconfig would warn about inconsistency, such as: include/config/auto.conf:3014:warning: symbol value 'm' invalid for HOTPLUG_PCI_PCIE Seen by Linus with the merge in aa8032b (sequence to reproduce by Michal): git checkout 1fe0135 make mrproper make allmodconfig make silentoldconfig git checkout aa8032b make allmodconfig make silentoldconfig Since HOTPLUG_PCI_PCIE changed from tristate to bool in aa8032b, it was previously set to 'm' in auto.conf by the first allmodconfig+silentoldconfig, but then was set to 'y' by the second allmodconfig. Then the second silentoldconfig prints the warning. The warning in this case is a spurious warning, which happens at the time kconfig tries to detect symbols that have changed, to touch the empty header files in include/config used for dependency-tracking by make. Silence the warning when we read the old auto.conf file, since it is perfectly legit that a symbol changed type since the previous call. Thread in: http://marc.info/?l=linux-pci&m=137569198904000&w=2 Reported-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Michal Marek <mmarek@suse.cz> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Bjorn Helgaas <bhelgaas@google.com> Cc: Yinghai Lu <yinghai@kernel.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/kconfig/confdata.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c
index c55c227af463..87f723804079 100644
--- a/scripts/kconfig/confdata.c
+++ b/scripts/kconfig/confdata.c
@@ -140,7 +140,9 @@ static int conf_set_sym_val(struct symbol *sym, int def, int def_flags, char *p)
140 sym->flags |= def_flags; 140 sym->flags |= def_flags;
141 break; 141 break;
142 } 142 }
143 conf_warning("symbol value '%s' invalid for %s", p, sym->name); 143 if (def != S_DEF_AUTO)
144 conf_warning("symbol value '%s' invalid for %s",
145 p, sym->name);
144 return 1; 146 return 1;
145 case S_OTHER: 147 case S_OTHER:
146 if (*p != '"') { 148 if (*p != '"') {
@@ -161,7 +163,8 @@ static int conf_set_sym_val(struct symbol *sym, int def, int def_flags, char *p)
161 memmove(p2, p2 + 1, strlen(p2)); 163 memmove(p2, p2 + 1, strlen(p2));
162 } 164 }
163 if (!p2) { 165 if (!p2) {
164 conf_warning("invalid string found"); 166 if (def != S_DEF_AUTO)
167 conf_warning("invalid string found");
165 return 1; 168 return 1;
166 } 169 }
167 /* fall through */ 170 /* fall through */
@@ -172,7 +175,9 @@ static int conf_set_sym_val(struct symbol *sym, int def, int def_flags, char *p)
172 sym->def[def].val = strdup(p); 175 sym->def[def].val = strdup(p);
173 sym->flags |= def_flags; 176 sym->flags |= def_flags;
174 } else { 177 } else {
175 conf_warning("symbol value '%s' invalid for %s", p, sym->name); 178 if (def != S_DEF_AUTO)
179 conf_warning("symbol value '%s' invalid for %s",
180 p, sym->name);
176 return 1; 181 return 1;
177 } 182 }
178 break; 183 break;