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: Mon, 02 Nov 2020 13:51:43 +0100	[thread overview]
Message-ID: <287855.1604321503@gemini.denx.de> (raw)
In-Reply-To: <a80c8548-a8a5-fb98-f9e3-fc659c2bdfec@denx.de>

Dear Heiko,

In message <a80c8548-a8a5-fb98-f9e3-fc659c2bdfec@denx.de> you wrote:
>
> I enabled now ENV_APPEND on this board and
>
> CONFIG_ENV_IS_NOWHERE
> CONFIG_ENV_IS_IN_SPI_FLASH

This gives me the creeps.  I know this is not cause by anything in
your patch, but anyway...

Apparently the meaning of CONFIG_ENV_IS_NOWHERE is nowhere
documented :-(

But common sense says that "IS NOWHERE" means that there is no
storage defined for the environment.  I would expect, that Kconfig
does not even allow to enable any CONFIG_ENV_IS_IN_* when
CONFIG_ENV_IS_NOWHERE is selected - these are logically exclusive.

May I suggest that:

1) our Kconfig files are changed such that CONFIG_ENV_IS_NOWHERE and
   CONFIG_ENV_IS_IN_* are indeed exclusive, so that we adhere to the
   POLA [1] ?

2) for cases like this one, where there actually _is_ some storage
   defined, but it shall be used in a non-standard way, a new
   CONFIG_ option gets created that expresses in it's name what it
   does?

[1] https://en.wikipedia.org/wiki/Principle_of_least_astonishment

Thanks!

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
You can fool some of the people all of the time, and You can fool all
of the people some of the time, but You can't fool mom.

  reply	other threads:[~2020-11-02 12:51 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 [this message]
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
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=287855.1604321503@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