public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: "Pali Rohár" <pali@kernel.org>
To: Simon Glass <sjg@chromium.org>
Cc: Troy Kisky <troy.kisky@boundarydevices.com>,
	Joe Hershberger <joe.hershberger@ni.com>,
	Wolfgang Denk <wd@denx.de>,
	U-Boot Mailing List <u-boot@lists.denx.de>
Subject: Re: [PATCH 1/2] Fix usage of CONFIG_PREBOOT
Date: Tue, 12 Jul 2022 13:18:27 +0200	[thread overview]
Message-ID: <20220712111827.7ssc23yleoi6yedy@pali> (raw)
In-Reply-To: <CAPnjgZ1intasYFZCCFmaS+kx1YTk6DLx-P902q+f99ck1ihPpA@mail.gmail.com>

On Tuesday 12 July 2022 04:58:51 Simon Glass wrote:
> Hi Pali,
> 
> On Sun, 10 Jul 2022 at 05:43, Pali Rohár <pali@kernel.org> wrote:
> >
> > Due to usage of PREBOOT in Kconfig, macro CONFIG_PREBOOT is always defined
> > when CONFIG_USE_PREBOOT is enabled. In case CONFIG_PREBOOT is not
> > explicitly enabled it is set to empty C string and therefore
> > '#ifdef CONFIG_PREBOOT' guard does not work. Fix this issue by introducing
> > a new Kconfig symbol PREBOOT_DEFINED which cause to define new C macro
> > CONFIG_PREBOOT_DEFINED only when CONFIG_PREBOOT is really defined.
> >
> > Change usage of '#ifdef CONFIG_PREBOOT' by '#ifdef CONFIG_USE_PREBOOT' for
> > code which checks if preboot code would be called and by
> > '#ifdef CONFIG_PREBOOT_DEFINED' for defining preboot code.
> >
> > Signed-off-by: Pali Rohár <pali@kernel.org>
> > ---
> >  board/boundary/nitrogen6x/nitrogen6x.c | 4 ++--
> >  boot/Kconfig                           | 4 ++++
> >  include/env_default.h                  | 2 +-
> >  3 files changed, 7 insertions(+), 3 deletions(-)
> 
> Can you not use:
> 
> #idef CONFIG_USE_PREBOOT
> 
> ?

Where?

> You should not be checking for the existence of a string Kconfig.

I do not see other option, because this is how kconfig is working. When
string option is not set then kconfig defines it to empty string.

> Regards,
> Simon

  reply	other threads:[~2022-07-12 11:18 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-10 11:42 [PATCH 1/2] Fix usage of CONFIG_PREBOOT Pali Rohár
2022-07-10 11:42 ` [PATCH 2/2] Nokia RX-51: Remove CONFIG_PREBOOT from defconfig Pali Rohár
2022-07-11 23:23   ` Tom Rini
2022-07-12  8:11     ` Pali Rohár
2022-07-12 21:39       ` Tom Rini
2022-07-12 21:52         ` Pali Rohár
2022-07-12 22:58           ` Tom Rini
2022-07-12 23:11             ` Pali Rohár
2022-07-12 23:15               ` Tom Rini
2022-07-13  8:36                 ` Pali Rohár
2022-07-25 21:21   ` Tom Rini
2022-07-27 18:34     ` Pali Rohár
2022-07-27 18:48       ` Tom Rini
2022-07-27 18:52         ` Pali Rohár
2022-07-27 18:58           ` Tom Rini
2022-07-27 19:01             ` Pali Rohár
2022-07-27 19:08               ` Tom Rini
2022-10-09 13:03                 ` Pali Rohár
2022-11-01 22:58                   ` Pali Rohár
2022-11-01 23:29                     ` Tom Rini
2022-11-20 16:37                       ` Pali Rohár
2022-07-12 10:58 ` [PATCH 1/2] Fix usage of CONFIG_PREBOOT Simon Glass
2022-07-12 11:18   ` Pali Rohár [this message]
2022-11-21 17:33 ` Tom Rini

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=20220712111827.7ssc23yleoi6yedy@pali \
    --to=pali@kernel.org \
    --cc=joe.hershberger@ni.com \
    --cc=sjg@chromium.org \
    --cc=troy.kisky@boundarydevices.com \
    --cc=u-boot@lists.denx.de \
    --cc=wd@denx.de \
    /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