From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wolfgang Denk Date: Mon, 02 Nov 2020 13:51:43 +0100 Subject: [PATCH] env: env_sf: don't set .init op if not needed In-Reply-To: References: <20201101133812.18701-1-michael@walle.cc> Message-ID: <287855.1604321503@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Heiko, In message 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.