From: gwenhael.goavec Date: Sat, 3 Mar 2012 15:57:19 +0100 Subject: [U-Boot] [PATCH] [PATCH] net/eth.c: Avoid Warning when ethxaddr is not set In-Reply-To: <20120303144448.BD2B882301@gemini.denx.de> References: <1330780211-90427-1-git-send-email-gwenhael.goavec-merou@armadeus.com> <20120303144448.BD2B882301@gemini.denx.de> Message-ID: <20120303155719.3ae222cc@trabucayre.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Sat, 03 Mar 2012 15:44:48 +0100 Wolfgang Denk wrote: > Dear Gwenhael Goavec-Merou, > > In message <1330780211-90427-1-git-send-email-gwenhael.goavec-merou@armadeus.com> you wrote: > > The return value for eth_getenv_enetaddr_by_index produces > > a Warning when ethXaddr is not set (env_enetaddr is equal > > to 00:00:00:00:00:00). > > > > The validity of the mac address is tested later in this > > function to avoid to write an erroneous address. > > > > The test of the function's return is consequently useless > > and adds a warning. > > Which use case do you have in mind? Why do you think this warning is > bad? I tend to consider it helpful instead. > For boards with mac address stored on an eeprom for example, the variable ethaddr is not needed. But with this test, a warning is always shown, without any reason. Best regards, Gwenhael Goavec-Merou > > > Best regards, > > Wolfgang Denk >