public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Wolfgang Denk <wd@denx.de>
To: u-boot@lists.denx.de
Subject: [PATCH] env: env_sf: don't set .init op if not needed
Date: Sun, 08 Nov 2020 14:22:37 +0100	[thread overview]
Message-ID: <541356.1604841757@gemini.denx.de> (raw)
In-Reply-To: <ac9500de-d236-be83-04a8-8f68be1c7672@prevas.dk>

Dear Rasmus,

In message <ac9500de-d236-be83-04a8-8f68be1c7672@prevas.dk> you wrote:
>
> > The CONFIG_ENV_IS_FOO means: if you use "env save", then U-Boot will
> > write the config to external storage using the FOO storage device.
>
> Wolfgang, you're wrong. What you're saying was once true, when the
> location was a "choice" in Kconfig, but it hasn't been that since
> fb69464eae. Nowadays one can select multiple possible backends, and only
> one of them will be used when doing "env save".

I know that.  But that slection is made from the selected drivers
enabled by the CONFIG_ENV_IS_* settings.

> Later (208bd2b8), _NOWHERE was made non-mutually-exclusive with the real
> storage targets.

And this is a buf that should be fixed, as it makes no sense at all.

> > If you define CONFIG_ENV_IS_NOWHERE, I would for example expect that
> > all "env save" related code is omitted as we will never need it.
>
> I haven't checked, but that functionality does seem to exist - not
> depending on whether CONFIG_ENV_IS_NOWHERE is not selected, but whether
> any of the CONFIG_ENV_IS_<somehere> is. See the ENV_IS_IN_DEVICE logic
> in cmd/nvedit.c. So if you select CONFIG_ENV_IS_NOWHERE and not any of
> the others, I think the build works as you'd expect.

This is intransparent and error prone.  This check must not be
implemented somewhere in the code, but at Kconfig level.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
      Bugs are by far the largest and  most successful class of
      entity, with nearly a million known species. In this res-
      pect they outnumber all the other  known  creatures about
      four to one.  -- Professor Snope's Encyclopedia of Animal

  parent reply	other threads:[~2020-11-08 13:22 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-01 13:38 [PATCH] env: env_sf: don't set .init op if not needed Michael Walle
2020-11-02  7:00 ` Heiko Schocher
2020-11-02 12:51   ` Wolfgang Denk
2020-11-03  5:15     ` Heiko Schocher
2020-11-03  7:52       ` Wolfgang Denk
2020-11-03  9:42         ` Rasmus Villemoes
2020-11-05 16:40           ` Wolfgang Denk
2020-11-06  7:46             ` Rasmus Villemoes
2020-11-06 20:45               ` Tom Rini
2020-11-08 13:25                 ` Wolfgang Denk
2020-11-08 13:22               ` Wolfgang Denk [this message]
2020-11-02 20:15   ` Michael Walle
2020-11-03  4:40     ` Heiko Schocher
2020-11-03 12:30       ` 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=541356.1604841757@gemini.denx.de \
    --to=wd@denx.de \
    --cc=u-boot@lists.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