kconfig: Warn if there is more than one help text
authorUlf Magnusson <ulfalizer@gmail.com>
Fri, 12 Jan 2018 06:47:47 +0000 (07:47 +0100)
committerChristian Lamparter <chunkeey@gmail.com>
Sun, 10 Feb 2019 20:47:24 +0000 (21:47 +0100)
commit16fabd50462a49c120d8c2ac3a25828a409c5b83
treecb7441bcb8a8344cfa9e4a2db0140fcd8c7824f9
parent2f1132cbcec40e431991cda7ff3744455b46c3df
kconfig: Warn if there is more than one help text

Avoids mistakes like in the following real-world example, where only the
final help string ("Say Y...") was used. This particular example was
fixed in commit 561b29e4ec8d ("media: fix media Kconfig help syntax
issues").

  config DVB_NETUP_UNIDVB
   ...
select DVB_CXD2841ER if MEDIA_SUBDRV_AUTOSELECT
   ---help---
     Support for NetUP PCI express Universal DVB card.
       help
   Say Y when you want to support NetUP Dual Universal DVB card
        ...

This now prints the following warning:

  drivers/media/pci/netup_unidvb:13: warning: 'DVB_NETUP_UNIDVB' defined with more than one help text -- only the last one will be used

Also free() any extra help strings.

Signed-off-by: Ulf Magnusson <ulfalizer@gmail.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
config/zconf.y