public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ulf Magnusson <ulfalizer@gmail.com>
To: linux-kbuild@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, yamada.masahiro@socionext.com,
	mcgrof@kernel.org, rdunlap@infradead.org,
	dan.carpenter@oracle.com, pebolle@tiscali.nl,
	Ulf Magnusson <ulfalizer@gmail.com>
Subject: [PATCH 11/11] kconfig: Warn if help text is blank
Date: Wed, 31 Jan 2018 10:34:30 +0100	[thread overview]
Message-ID: <20180131093434.20050-12-ulfalizer@gmail.com> (raw)
In-Reply-To: <20180131093434.20050-1-ulfalizer@gmail.com>

Blank help texts are probably either a typo, a Kconfig misunderstanding,
or some kind of half-committing to adding a help text (in which case a
TODO comment would be clearer, if the help text really can't be added
right away).

Best to flag them, IMO.

Example warning:

	drivers/mmc/host/Kconfig:877: warning: 'MMC_TOSHIBA_PCI' defined with blank help text

Signed-off-by: Ulf Magnusson <ulfalizer@gmail.com>
---
 scripts/kconfig/zconf.y | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/scripts/kconfig/zconf.y b/scripts/kconfig/zconf.y
index 21ce883e5d9e..4be98050b961 100644
--- a/scripts/kconfig/zconf.y
+++ b/scripts/kconfig/zconf.y
@@ -436,6 +436,12 @@ help: help_start T_HELPTEXT
 		zconfprint("warning: '%s' defined with more than one help text -- only the last one will be used",
 			   current_entry->sym->name ?: "<choice>");
 	}
+
+	/* Is the help text empty or all whitespace? */
+	if ($2[strspn($2, " \f\n\r\t\v")] == '\0')
+		zconfprint("warning: '%s' defined with blank help text",
+			   current_entry->sym->name ?: "<choice>");
+
 	current_entry->help = $2;
 };
 
-- 
2.14.1

  parent reply	other threads:[~2018-01-31  9:36 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-31  9:34 [PATCH 00/11] Remove blank help texts from Kconfig files and add warning Ulf Magnusson
2018-01-31  9:34 ` [PATCH 01/11] net/sched: kconfig: Remove blank help texts Ulf Magnusson
2018-01-31  9:34 ` [PATCH 02/11] video: fbdev: kconfig: Remove blank help text Ulf Magnusson
2018-02-01 15:52   ` Bartlomiej Zolnierkiewicz
2018-02-01 16:56     ` Ulf Magnusson
2018-02-01 17:07       ` Masahiro Yamada
2018-02-13 12:31       ` Bartlomiej Zolnierkiewicz
2018-02-13 14:02         ` [PATCH] video: fbdev: kconfig: Add help text to FB_I810_I2C Ulf Magnusson
2018-03-12 15:08           ` Bartlomiej Zolnierkiewicz
2018-01-31  9:34 ` [PATCH 03/11] mmc: kconfig: Remove blank help text Ulf Magnusson
2018-02-01 17:09   ` Masahiro Yamada
2018-02-14 10:11     ` Ulf Hansson
2018-01-31  9:34 ` [PATCH 04/11] Staging: rtl8192u: " Ulf Magnusson
2018-02-01 17:09   ` Masahiro Yamada
2018-01-31  9:34 ` [PATCH 05/11] Staging: rtl8192e: " Ulf Magnusson
2018-02-01 17:09   ` Masahiro Yamada
2018-01-31  9:34 ` [PATCH 06/11] lib/Kconfig.debug: " Ulf Magnusson
2018-02-01 17:10   ` Masahiro Yamada
2018-01-31  9:34 ` [PATCH 07/11] MIPS: BCM63XX: kconfig: " Ulf Magnusson
2018-01-31  9:34 ` [PATCH 08/11] MIPS: " Ulf Magnusson
2018-02-01 17:11   ` Masahiro Yamada
2018-01-31  9:34 ` [PATCH 09/11] arm: vt8500: " Ulf Magnusson
2018-02-01 17:11   ` Masahiro Yamada
2018-01-31  9:34 ` [PATCH 10/11] nios2: " Ulf Magnusson
2018-02-01 17:11   ` Masahiro Yamada
2018-02-02  9:28   ` Ley Foon Tan
2018-01-31  9:34 ` Ulf Magnusson [this message]
2018-01-31 15:27 ` [PATCH 00/11] Remove blank help texts from Kconfig files and add warning Masahiro Yamada
2018-01-31 20:46   ` Randy Dunlap
2018-02-01 17:07     ` 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=20180131093434.20050-12-ulfalizer@gmail.com \
    --to=ulfalizer@gmail.com \
    --cc=dan.carpenter@oracle.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mcgrof@kernel.org \
    --cc=pebolle@tiscali.nl \
    --cc=rdunlap@infradead.org \
    --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