From: Rasmus Villemoes <linux@rasmusvillemoes.dk>
To: Masahiro Yamada <yamada.masahiro@socionext.com>,
Michal Marek <michal.lkml@markovi.net>
Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>,
linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 2/3] fixdep: remove some false CONFIG_ matches
Date: Wed, 28 Feb 2018 20:17:36 +0100 [thread overview]
Message-ID: <20180228191805.20094-2-linux@rasmusvillemoes.dk> (raw)
In-Reply-To: <20180228191805.20094-1-linux@rasmusvillemoes.dk>
The string CONFIG_ quite often appears after other alphanumerics,
meaning that that instance cannot be referencing a Kconfig
symbol. Omitting these means make has fewer files to stat() when
deciding what needs to be rebuilt - for a defconfig build, this seems to
remove about 2% of the (wildcard ...) lines from the .o.cmd files.
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
---
scripts/basic/fixdep.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/scripts/basic/fixdep.c b/scripts/basic/fixdep.c
index d7fbe545dd5d..1b21870d6e7f 100644
--- a/scripts/basic/fixdep.c
+++ b/scripts/basic/fixdep.c
@@ -225,8 +225,13 @@ static int str_ends_with(const char *s, int slen, const char *sub)
static void parse_config_file(const char *p)
{
const char *q, *r;
+ const char *start = p;
while ((p = strstr(p, "CONFIG_"))) {
+ if (p > start && (isalnum(p[-1]) || p[-1] == '_')) {
+ p += 7;
+ continue;
+ }
p += 7;
q = p;
while (*q && (isalnum(*q) || *q == '_'))
--
2.15.1
next prev parent reply other threads:[~2018-02-28 19:18 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-22 17:41 [PATCH v3] kconfig.h: Include compiler types to avoid missed struct attributes Kees Cook
2018-02-22 18:04 ` Linus Torvalds
2018-02-22 19:57 ` Kees Cook
2018-02-22 20:17 ` Linus Torvalds
2018-02-22 21:07 ` Rasmus Villemoes
2018-02-22 21:22 ` Kees Cook
2018-02-22 21:23 ` Linus Torvalds
2018-02-22 21:54 ` Linus Torvalds
2018-02-22 21:34 ` Rasmus Villemoes
2018-02-22 21:56 ` Linus Torvalds
2018-02-28 19:17 ` [PATCH 1/3] fixdep: remove stale references to uml-config.h Rasmus Villemoes
2018-02-28 19:17 ` Rasmus Villemoes [this message]
2018-02-28 19:17 ` [PATCH 3/3] fixdep: do not ignore kconfig.h Rasmus Villemoes
2018-03-05 4:52 ` Masahiro Yamada
2018-03-05 8:15 ` Rasmus Villemoes
2018-03-05 9:38 ` Masahiro Yamada
2018-03-05 14:49 ` Masahiro Yamada
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180228191805.20094-2-linux@rasmusvillemoes.dk \
--to=linux@rasmusvillemoes.dk \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michal.lkml@markovi.net \
--cc=yamada.masahiro@socionext.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox