From: Andreas Ruprecht <andreas.ruprecht@fau.de>
To: Paul Bolle <pebolle@tiscali.nl>,
Valentin Rothberg <valentinrothberg@gmail.com>
Cc: rafael.j.wysocki@intel.com, linux-kbuild@vger.kernel.org,
linux-kernel@vger.kernel.org,
hengelein Stefan <stefan.hengelein@fau.de>,
linux@dominikbrodowski.net
Subject: Re: Kconfig: '+config' valid syntax?
Date: Fri, 03 Jul 2015 11:29:07 +0200 [thread overview]
Message-ID: <559655E3.6010400@fau.de> (raw)
In-Reply-To: <1435913987.2423.38.camel@tiscali.nl>
[-- Attachment #1: Type: text/plain, Size: 2035 bytes --]
On 07/03/2015 10:59, Paul Bolle wrote:
> On vr, 2015-07-03 at 09:33 +0200, Andreas Ruprecht wrote:
>> I tested the behaviour on yesterday's linux-next, but the commit
>> mentioned above will only complain for invalid characters inside the
>> PARAM case and not for COMMANDs. So, as an example, if you write
>> something like
>>
>> config ACPI_REV_OVERRIDE_POSSIBLE
>> depends on X86 +
>> [...]
>>
>> Kconfig will complain about the '+'. This, however, does not apply for
>> top-level statements like 'config', 'menuconfig', and so on.
>
> Which might explain why this silly mistake went unnoticed. (And, as I
> think you implied, it doesn't help that the empty rule we're hitting
> here is not commented.)
>
> So the naive solution seems to be to also add the warning to COMMAND's
> rule for '.'. A quick test suggest that would work. Am I missing some
> obvious downside with that solution?
Well, as I mentioned earlier, with a patch similar to the one below this
warning is also generated three times for every '---' before 'help'.
This results in a giant pile of warnings:
ruprecht@box:linux-next$ rm -f scripts/kconfig/*_shipped &&
REGENERATE_PARSERS=1 make allyesconfig 2>&1 | wc -l
7419
The output looks like this:
scripts/kconfig/conf --allyesconfig Kconfig
arch/x86/Kconfig:4:warning: ignoring unsupported character '-'
arch/x86/Kconfig:4:warning: ignoring unsupported character '-'
arch/x86/Kconfig:4:warning: ignoring unsupported character '-'
init/Kconfig:222:warning: ignoring unsupported character '-'
init/Kconfig:222:warning: ignoring unsupported character '-'
init/Kconfig:222:warning: ignoring unsupported character '-'
init/Kconfig:244:warning: ignoring unsupported character '-'
init/Kconfig:244:warning: ignoring unsupported character '-'
init/Kconfig:244:warning: ignoring unsupported character '-'
[...]
So we would need to add special treatment for '-' also in the command
case, right? But that doesn't look appealing to me, more like a dirty,
dirty hack around the actual problem...
Regards,
Andreas
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: zconf.l.patch --]
[-- Type: text/x-patch; name="zconf.l.patch", Size: 463 bytes --]
diff --git a/scripts/kconfig/zconf.l b/scripts/kconfig/zconf.l
index 200a3fe..642f5b2 100644
--- a/scripts/kconfig/zconf.l
+++ b/scripts/kconfig/zconf.l
@@ -106,7 +106,11 @@ n [A-Za-z0-9_]
zconflval.string = text;
return T_WORD;
}
- .
+ . {
+ fprintf(stderr,
+ "%s:%d:warning: ignoring unsupported character '%c'\n",
+ zconf_curname(), zconf_lineno(), *yytext);
+ }
\n {
BEGIN(INITIAL);
current_file->lineno++;
next prev parent reply other threads:[~2015-07-03 9:29 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-02 8:08 Kconfig: '+config' valid syntax? Valentin Rothberg
2015-07-02 9:01 ` Paul Bolle
2015-07-02 9:25 ` Paul Bolle
2015-07-02 11:57 ` Andreas Ruprecht
2015-07-02 12:10 ` Paul Bolle
2015-07-03 7:33 ` Andreas Ruprecht
2015-07-03 8:59 ` Paul Bolle
2015-07-03 9:29 ` Andreas Ruprecht [this message]
2015-07-03 10:46 ` Ulf Magnusson
2015-07-03 10:51 ` Valentin Rothberg
2015-07-03 10:56 ` Stefan Hengelein
2015-07-03 11:11 ` Stefan Hengelein
2015-07-03 11:34 ` Ulf Magnusson
2015-07-03 11:00 ` Paul Bolle
2015-07-03 11:33 ` Andreas Ruprecht
2015-07-03 11:40 ` Ulf Magnusson
2015-07-03 12:39 ` Ulf Magnusson
2015-07-03 12:48 ` Ulf Magnusson
2015-07-03 11:58 ` Paul Bolle
2015-07-03 10:52 ` Paul Bolle
2015-07-02 19:59 ` Rafael J. Wysocki
2015-07-03 10:16 ` Ulf Magnusson
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=559655E3.6010400@fau.de \
--to=andreas.ruprecht@fau.de \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@dominikbrodowski.net \
--cc=pebolle@tiscali.nl \
--cc=rafael.j.wysocki@intel.com \
--cc=stefan.hengelein@fau.de \
--cc=valentinrothberg@gmail.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