From mboxrd@z Thu Jan 1 00:00:00 1970 From: York Sun Date: Mon, 10 Aug 2015 13:45:17 -0700 Subject: [U-Boot] [PATCH v3 11/16] net/eth.c: Add function to validate a MAC address In-Reply-To: References: <1437746136-14379-1-git-send-email-codrin.ciubotariu@freescale.com> <1437746136-14379-8-git-send-email-codrin.ciubotariu@freescale.com> <55C54DC2.2070401@freescale.com> <55C8FE55.1070302@freescale.com> <55C90389.9090804@freescale.com> Message-ID: <55C90D5D.4000705@freescale.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 08/10/2015 01:05 PM, Joe Hershberger wrote: > Hi York, > > On Mon, Aug 10, 2015 at 3:03 PM, York Sun wrote: >> >> >> On 08/10/2015 12:57 PM, Joe Hershberger wrote: >>> Too much top-posting. >>> >>> On Mon, Aug 10, 2015 at 2:41 PM, York Sun wrote: >>>> SPL doesn't use net/eth.c. You add a call in env_flags.c. >>>> >>>> I think you can put it in header file and use static inline, or keep it in the >>>> same file where it is called. >>> >>> That is probably fine. >>> >>>> Another way is to undef CONFIG_CMD_NET for SPL part. It is default to 'y' in >>>> Kconfig. Joe may have some good suggestion. >>> >>> I don't think this is the reason. The problem is that net is *not* >>> build for SPL, but env is. >> >> Yes, env is built. The offending lines in common/env_flags.c are gated by >> "#ifdef CONFIG_CMD_NET". That's why I say it could be another way. > > OK, sure... but that breaks intended behavior, I think. > I see. The CONFIG_CMD_NET is not evaluated separated for SPL build. So I guess the fix can be either to put the common function in header file after making it really simple to reduce dependency, or to keep the original code in env_flag.c. York