From mboxrd@z Thu Jan 1 00:00:00 1970 From: Maxime Ripard Date: Wed, 7 Feb 2018 19:48:19 +0100 Subject: [U-Boot] [PATCH v3 09/15] env: Support multiple environments In-Reply-To: <1d95f856-5488-90da-e910-fc4a05314cae@de.pepperl-fuchs.com> References: <844212451999302a41d87526d6616b1af7c781d1.1516723179.git-series.maxime.ripard@free-electrons.com> <64448a79-f856-0cd9-d9b2-a5e29b92d768@de.pepperl-fuchs.com> <20180207081913.wa33sx6k4iwxdecs@flea> <1d95f856-5488-90da-e910-fc4a05314cae@de.pepperl-fuchs.com> Message-ID: <20180207184819.65bfmn3rwxeksxn3@flea> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 1;5002;0c On Wed, Feb 07, 2018 at 09:25:55AM +0100, Simon Goldschmidt wrote: > On 07.02.2018 09:19, Maxime Ripard wrote: > > On Tue, Feb 06, 2018 at 09:09:07AM +0100, Simon Goldschmidt wrote: > > > On 23.01.2018 21:16, Maxime Ripard wrote: > > > > Now that we have everything in place to support multiple environment, let's > > > > make sure the current code can use it. > > > I get more build errors testing this feature: there's a global variable > > > 'env_ptr' declared in flash, nand, nvram and remote env drivers (declared as > > > extern in envrionment.h). From reading the code, it seems like these could > > > just be changed to static, since 'env_ptr' is not used outside these > > > drivers? > > Given Joakim's comment, I guess we should keep them !static, rename > > them to $env_env_ptr, and remove the definition in the > > include/environment that doesn't seem used anywhere. > > That's OK for me, I just wanted to point out the build error. > > However, I do think that having unnecessary non-static global variables is > not really good coding style as you risk name clashes. I'd really be > interested in a reason for this. If the relocation works with a static variable, I'm all for it. Maxime -- Maxime Ripard, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering http://bootlin.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: not available URL: