mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <sha@pengutronix.de>
To: Christian Melki <christian.melki@t2data.com>
Cc: barebox@lists.infradead.org, masahiroy@kernel.org
Subject: Re: [PATCH] Re-enable warning for non-existent symbols.
Date: Tue, 1 Mar 2022 10:18:59 +0100	[thread overview]
Message-ID: <20220301091859.GS19585@pengutronix.de> (raw)
In-Reply-To: <20220223193025.1907423-1-christian.melki@t2data.com>

Hi,

On Wed, Feb 23, 2022 at 08:30:25PM +0100, Christian Melki wrote:
> From the kernel:
> Commit f072181e6403b0fe2e2aa800a005497b748fd284 ("kconfig: drop the
> ""trying to assign nonexistent symbol" warning").
> 
> Rationale behind re-enabling this is that as an embedded developer,
> I often find myself doing oldconfigs during upgrades. Symbols
> do change names and are sometimes lost silently, with the occasional
> headache. My need for these warnings are probably different than
> the need of the typical kernel developer.
> 
> (Un)fortunatly, a lot of projects directly inherit the kernel kconfig/lxdialog
> variant without much thought into their own symbols and practices.
> The kernel itself has some 1k+ non-existent symbols in various
> defconfigs as developers are not nagged about their cleanliness.
> 
> This warning could do well in various projects. Barebox, ptxdist,
> U-boot, busybox etc.

I am still unsure about this one. First of all Masahiro frequently
syncs the kconfig files with recent Linux, so I don't know how long
this change will last. Then from time to time we regenerate defconfigs
which means the warnings will just vanish without further notice.

Maybe you just have to do a

make x_defconfig; make savedefconfig; mv defconfig arch/y/configs/x_defconfig; git diff

from time to time.

Sascha

> 
> Signed-off-by: Christian Melki <christian.melki@t2data.com>
> ---
>  scripts/kconfig/confdata.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c
> index cf72680cd..d189e088d 100644
> --- a/scripts/kconfig/confdata.c
> +++ b/scripts/kconfig/confdata.c
> @@ -439,6 +439,7 @@ load:
>  			if (def == S_DEF_USER) {
>  				sym = sym_find(line + 2 + strlen(CONFIG_));
>  				if (!sym) {
> +					conf_warning("trying to assign nonexistent symbol %s", line + 2 + strlen(CONFIG_));
>  					conf_set_changed(true);
>  					continue;
>  				}
> @@ -481,8 +482,10 @@ load:
>  					 * include/config/FOO must be touched.
>  					 */
>  					conf_touch_dep(line + strlen(CONFIG_));
> -				else
> +				else {
>  					conf_set_changed(true);
> +					conf_warning("trying to assign nonexistent symbol %s", line + strlen(CONFIG_));
> +				}
>  				continue;
>  			}
>  
> -- 
> 2.30.2
> 
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


      reply	other threads:[~2022-03-01  9:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-23 19:30 Christian Melki
2022-03-01  9:18 ` Sascha Hauer [this message]

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=20220301091859.GS19585@pengutronix.de \
    --to=sha@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=christian.melki@t2data.com \
    --cc=masahiroy@kernel.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