mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: Andrew Morton <akpm@osdl.org>, Roman Zippel <zippel@linux-m68k.org>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] kconfig: Improve warnings related to select
Date: Tue, 20 Jan 2004 20:50:24 +0100	[thread overview]
Message-ID: <20040120195024.GA14417@mars.ravnborg.org> (raw)

Hi Andrew & Roman.

Use the official keyword 'select' when kconfig reports wrong usage.
Be more specific when wrong usage is encountered.

Other warnings from kconfig could use same treatment, but kept this minimal for now.

	Sam

===== scripts/kconfig/menu.c 1.11 vs edited =====
--- 1.11/scripts/kconfig/menu.c	Wed Jun  4 23:55:02 2003
+++ edited/scripts/kconfig/menu.c	Tue Jan 20 20:33:12 2004
@@ -275,10 +275,19 @@
 				break;
 			case P_SELECT:
 				sym2 = prop_get_symbol(prop);
-				if ((sym->type != S_BOOLEAN && sym->type != S_TRISTATE) ||
-				    (sym2->type != S_BOOLEAN && sym2->type != S_TRISTATE))
-					fprintf(stderr, "%s:%d:warning: enable is only allowed with boolean and tristate symbols\n",
-						prop->file->name, prop->lineno);
+				if (sym->type != S_BOOLEAN && sym->type != S_TRISTATE)
+					fprintf(stderr, "%s:%d:warning: config symbol '%s' uses select, "
+					                "but is not boolean or tristate\n",
+						prop->file->name, prop->lineno, sym->name);
+				else if (sym2->type == S_UNKNOWN)
+					fprintf(stderr, "%s:%d:warning: 'select' used by config symbol '%s' "
+							"refer to undefined symbol '%s'\n",
+						prop->file->name, prop->lineno, sym->name, sym2->name);
+				else if (sym2->type != S_BOOLEAN && sym2->type != S_TRISTATE)
+					fprintf(stderr, "%s:%d:warning: '%s' has wrong type."
+					                " 'select' only accept arguments of "
+					                "boolean and tristate type.\n",
+						prop->file->name, prop->lineno, sym2->name);
 				break;
 			case P_RANGE:
 				if (sym->type != S_INT && sym->type != S_HEX)

                 reply	other threads:[~2004-01-20 19:49 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20040120195024.GA14417@mars.ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=zippel@linux-m68k.org \
    /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

all inboxes | Powered by JetHome®