From patchwork Wed Feb 28 19:17:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rasmus Villemoes X-Patchwork-Id: 10249437 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3C6C6605FE for ; Wed, 28 Feb 2018 19:20:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 242C928E3A for ; Wed, 28 Feb 2018 19:20:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 18F7D28E50; Wed, 28 Feb 2018 19:20:29 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5539F28E6C for ; Wed, 28 Feb 2018 19:20:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933233AbeB1TSi (ORCPT ); Wed, 28 Feb 2018 14:18:38 -0500 Received: from mail-wm0-f66.google.com ([74.125.82.66]:35480 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933361AbeB1TSR (ORCPT ); Wed, 28 Feb 2018 14:18:17 -0500 Received: by mail-wm0-f66.google.com with SMTP id x7so7168241wmc.0 for ; Wed, 28 Feb 2018 11:18:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rasmusvillemoes.dk; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Bq9bGdKDQnZzg1LhpFh3w27++MAEyJUcBWNSCcb8xag=; b=RbaGq3rszRiygx67E24ZfOqMYkrbVTZ23LbF7uadK01/dRzxSRr+NoWDTtVskSaySn YxqRNFt0nv6YsXBjFOInHH7WT0+OxvvnjFO2EyXqM+Vvvhwa0eMFWM7vBYmtpYiXRSS5 j07YPYB96oyLikfb6m/5BvwPHohzwNcOrL9bc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Bq9bGdKDQnZzg1LhpFh3w27++MAEyJUcBWNSCcb8xag=; b=lBxfUisoyvxbQ513jkGYJhp+9z0GnUzChWoN8Tz3SnZxy9KKYi7lGrMMmg/oacuxWY RFccK59gGEFVOgXTLz1djapKcK9wn/h+ohAj086gQ9WmOFN/g55XpbY8tiQTiAKS8k9n NFR/UbzgnzrNKR3pcccPt1EIBhzvgdvXgvyQmQH6JMgyOaf5q9s8u1Zq6+nw3pv8iUzI KSuZC1OqVkWZ4gsTlLRP7Kwf32/bdBc7kDZyNCO9MfKiIkWGDVF1PBV3S9UDwnsCrwfk ovrcFVCeheRfdBlHBD9lPwfe4oxlNV3onSK6IX7ZsXBc0HAl7ykGBNFlOq66Qkh8JTCZ T/wA== X-Gm-Message-State: APf1xPB+Jb8gcSIfIn+AVGrF4rFMp6lzvgAekVdJmcImquS2xLiy8dJY fZwEVn2FOrzAjICLLMFjOuFRNw== X-Google-Smtp-Source: AH8x224bArGh0Nv+Ue9uLYJfwZnJpIYzt8yWApxTF8GkEyDSL/ialFoJ1dplaLurhmwejZFWW7SZwg== X-Received: by 10.80.151.214 with SMTP id f22mr23765005edb.163.1519845496362; Wed, 28 Feb 2018 11:18:16 -0800 (PST) Received: from prevas-ravi.waoo.dk (dhcp-5-186-126-104.cgn.ip.fibianet.dk. [5.186.126.104]) by smtp.gmail.com with ESMTPSA id l60sm2063613edl.56.2018.02.28.11.18.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 28 Feb 2018 11:18:15 -0800 (PST) From: Rasmus Villemoes To: Masahiro Yamada , Michal Marek Cc: Rasmus Villemoes , Linus Torvalds , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/3] fixdep: do not ignore kconfig.h Date: Wed, 28 Feb 2018 20:17:37 +0100 Message-Id: <20180228191805.20094-3-linux@rasmusvillemoes.dk> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180228191805.20094-1-linux@rasmusvillemoes.dk> References: <20180228191805.20094-1-linux@rasmusvillemoes.dk> Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP kconfig.h was excluded from consideration by fixdep by 6a5be57f0f00 (fixdep: fix extraneous dependencies) to avoid some false positive hits (1) include/config/.h (2) include/config/h.h (3) include/config/foo.h (1) occurred because kconfig.h contains the string CONFIG_ in a comment. However, since dee81e988674 (fixdep: faster CONFIG_ search), we have a check that the part after CONFIG_ is non-empty, so this does not happen anymore (and CONFIG_ appears by itself elsewhere, so that check is worthwhile). (2) comes from the include guard, __LINUX_KCONFIG_H. But with the previous patch, we no longer match that either. That leaves (3), which amounts to one [1] false dependency (aka stat() call done by make), which I think we can live with: We've already had one case [2] where the lack of include/linux/kconfig.h in the .o.cmd file caused a missing rebuild, and while I originally thought we should just put kconfig.h in the dependency list without parsing it for the CONFIG_ pattern, we actually do have some real CONFIG_ symbols mentioned in it, and one can imagine some translation unit that just does '#ifdef __BIG_ENDIAN' but doesn't through some other header actually depend on CONFIG_CPU_BIG_ENDIAN - so changing the target endianness could end up rebuilding the world, minus that small TU. Quoting Linus, ... when missing dependencies cause a missed re-compile, the resulting bugs can be _really_ subtle. [1] well, two, we now also have CONFIG_BOOGER/booger.h - we could change that to FOO if we care [2] https://lkml.org/lkml/2018/2/22/838 Cc: Linus Torvalds Signed-off-by: Rasmus Villemoes --- scripts/basic/fixdep.c | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/basic/fixdep.c b/scripts/basic/fixdep.c index 1b21870d6e7f..449b68c4c90c 100644 --- a/scripts/basic/fixdep.c +++ b/scripts/basic/fixdep.c @@ -283,7 +283,6 @@ static int is_ignored_file(const char *s, int len) { return str_ends_with(s, len, "include/generated/autoconf.h") || str_ends_with(s, len, "include/generated/autoksyms.h") || - str_ends_with(s, len, "include/linux/kconfig.h") || str_ends_with(s, len, ".ver"); }