From patchwork Thu Aug 15 21:17:32 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yann E. MORIN" X-Patchwork-Id: 2845291 Return-Path: X-Original-To: patchwork-linux-kbuild@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 9C099BF546 for ; Thu, 15 Aug 2013 21:18:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A39FE202EA for ; Thu, 15 Aug 2013 21:18:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AD7F7202F8 for ; Thu, 15 Aug 2013 21:18:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752524Ab3HOVSP (ORCPT ); Thu, 15 Aug 2013 17:18:15 -0400 Received: from mail-wg0-f45.google.com ([74.125.82.45]:38168 "EHLO mail-wg0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752081Ab3HOVRn (ORCPT ); Thu, 15 Aug 2013 17:17:43 -0400 Received: by mail-wg0-f45.google.com with SMTP id x12so971076wgg.12 for ; Thu, 15 Aug 2013 14:17:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=1bmf6/QlsTRu/gmFla141bHNbiVDbuIfPmLgtxqhrak=; b=WZFZGHlHkPZBTd6VFkypxuryCPAY7A5oWLzMvJGd4AzM1pBxrjVYbSngSs5o9ZhjUc S6gMvGisfVvRUTclBS8nj7wSVFFaaxSqrDMkG5lV9k+mmPE/7dUVGYNOquuA2FIXIPiY gyzvllG+zXAxlIp/RTvVkZj+QDuDTUXbm84iijVjX6z3ETarzj14DcUXY/3ADRQWSWTl Fxsc0mgC5uBNvC89UWqF4xmIr7RoT6ghQ6MesZ+xyFWp+wFLXJfweDDOdkPs8mgCwDYQ ebJhq2ruAGz/KdeTY9Jw+E568MJrKJyONCoj7jLRmJnWjvjUAiyVSZ2AMhMCSsrxAdBW jB7g== X-Received: by 10.180.149.204 with SMTP id uc12mr2991778wib.47.1376601461880; Thu, 15 Aug 2013 14:17:41 -0700 (PDT) Received: from gourin.bzh.lan (ks3095497.kimsufi.com. [94.23.60.27]) by mx.google.com with ESMTPSA id fz8sm4914606wic.0.1969.12.31.16.00.00 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 15 Aug 2013 14:17:41 -0700 (PDT) From: "Yann E. MORIN" To: linux-kbuild@vger.kernel.org, Michal Marek Cc: linux-kernel@vger.kernel.org, "Yann E. MORIN" , Linus Torvalds , Thomas Petazzoni , Bjorn Helgaas , Yinghai Lu , Benjamin Herrenschmidt Subject: [PATCH 3/4] kconfig: silence warning when parsing auto.conf when a symbol has changed type Date: Thu, 15 Aug 2013 23:17:32 +0200 Message-Id: <04b19b773a60d201bc1b187ba7a7c86dc237a27b.1376600922.git.yann.morin.1998@free.fr> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: References: In-Reply-To: References: Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, FREEMAIL_FROM,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: "Yann E. MORIN" 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 Signed-off-by: "Yann E. MORIN" Cc: Linus Torvalds Cc: Michal Marek Cc: Thomas Petazzoni Cc: Bjorn Helgaas Cc: Yinghai Lu Cc: Benjamin Herrenschmidt --- scripts/kconfig/confdata.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c index c55c227..87f7238 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) sym->flags |= def_flags; break; } - conf_warning("symbol value '%s' invalid for %s", p, sym->name); + if (def != S_DEF_AUTO) + conf_warning("symbol value '%s' invalid for %s", + p, sym->name); return 1; case S_OTHER: if (*p != '"') { @@ -161,7 +163,8 @@ static int conf_set_sym_val(struct symbol *sym, int def, int def_flags, char *p) memmove(p2, p2 + 1, strlen(p2)); } if (!p2) { - conf_warning("invalid string found"); + if (def != S_DEF_AUTO) + conf_warning("invalid string found"); return 1; } /* fall through */ @@ -172,7 +175,9 @@ static int conf_set_sym_val(struct symbol *sym, int def, int def_flags, char *p) sym->def[def].val = strdup(p); sym->flags |= def_flags; } else { - conf_warning("symbol value '%s' invalid for %s", p, sym->name); + if (def != S_DEF_AUTO) + conf_warning("symbol value '%s' invalid for %s", + p, sym->name); return 1; } break;