public inbox for linux-kbuild@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] kconfig: add unexpected data itself to warning
@ 2016-03-16 20:27 Paul Bolle
  2016-04-27 19:20 ` Paul Bolle
  0 siblings, 1 reply; 3+ messages in thread
From: Paul Bolle @ 2016-03-16 20:27 UTC (permalink / raw)
  To: Michal Marek; +Cc: Josh Boyer, linux-kbuild, linux-kernel

If the .config parser runs into unexpected data it emits warnings like:
    .config:6911:warning: unexpected data

Add the unexpected data itself to this warning. That makes it easier to
discover what is actually going wrong:
     .config:6911:warning: unexpected data: CONFOG_CHARGER_TPS65217=m

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
---
This v2 uses strcspn, as Michal suggesed. That turns a two patch series into a
more elegant oneliner. It apparently pays off to know what string.h has to
offer!

 scripts/kconfig/confdata.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c
index 0b7dc2fd7bac..6e22176cd6d6 100644
--- a/scripts/kconfig/confdata.c
+++ b/scripts/kconfig/confdata.c
@@ -377,7 +377,9 @@ load:
 				continue;
 		} else {
 			if (line[0] != '\r' && line[0] != '\n')
-				conf_warning("unexpected data");
+				conf_warning("unexpected data: %.*s",
+					     (int)strcspn(line, "\r\n"), line);
+
 			continue;
 		}
 setsym:
-- 
2.4.3


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] kconfig: add unexpected data itself to warning
  2016-03-16 20:27 [PATCH v2] kconfig: add unexpected data itself to warning Paul Bolle
@ 2016-04-27 19:20 ` Paul Bolle
  2016-05-10 15:21   ` Michal Marek
  0 siblings, 1 reply; 3+ messages in thread
From: Paul Bolle @ 2016-04-27 19:20 UTC (permalink / raw)
  To: Michal Marek; +Cc: Josh Boyer, linux-kbuild, linux-kernel

Hi Michal,

On wo, 2016-03-16 at 21:27 +0100, Paul Bolle wrote:
> If the .config parser runs into unexpected data it emits warnings
> like:
>     .config:6911:warning: unexpected data
> 
> Add the unexpected data itself to this warning. That makes it easier to
> discover what is actually going wrong:
>      .config:6911:warning: unexpected data: CONFOG_CHARGER_TPS65217=m
> 
> Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
> ---
> This v2 uses strcspn, as Michal suggesed. That turns a two patch series into a
> more elegant oneliner. It apparently pays off to know what string.h has to
> offer!

Nothing happened after I sent v2, as far as I can tell. Did this
oneliner fall through the cracks? 

Thanks,


Paul Bolle

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] kconfig: add unexpected data itself to warning
  2016-04-27 19:20 ` Paul Bolle
@ 2016-05-10 15:21   ` Michal Marek
  0 siblings, 0 replies; 3+ messages in thread
From: Michal Marek @ 2016-05-10 15:21 UTC (permalink / raw)
  To: Paul Bolle; +Cc: Josh Boyer, linux-kbuild, linux-kernel

On Wed, Apr 27, 2016 at 09:20:17PM +0200, Paul Bolle wrote:
> Hi Michal,
> 
> On wo, 2016-03-16 at 21:27 +0100, Paul Bolle wrote:
> > If the .config parser runs into unexpected data it emits warnings
> > like:
> >     .config:6911:warning: unexpected data
> > 
> > Add the unexpected data itself to this warning. That makes it easier to
> > discover what is actually going wrong:
> >      .config:6911:warning: unexpected data: CONFOG_CHARGER_TPS65217=m
> > 
> > Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
> > ---
> > This v2 uses strcspn, as Michal suggesed. That turns a two patch series into a
> > more elegant oneliner. It apparently pays off to know what string.h has to
> > offer!
> 
> Nothing happened after I sent v2, as far as I can tell. Did this
> oneliner fall through the cracks? 

The kbuild maintainer has fallen through cracks for a while ;). Applied
to kbuild.git#kconfig now.

Michal

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-05-10 15:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-16 20:27 [PATCH v2] kconfig: add unexpected data itself to warning Paul Bolle
2016-04-27 19:20 ` Paul Bolle
2016-05-10 15:21   ` Michal Marek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox