From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jerry Van Baren Date: Thu, 02 Nov 2006 11:00:05 -0500 Subject: [U-Boot-Users] [PATCH] Add a oftdump (open firmware flattened tree dump) command. In-Reply-To: <528646bc0611020746u3c7874d0wb6375d6c603101d4@mail.gmail.com> References: <45479A44.6020505@smiths-aerospace.com> <528646bc0611020746u3c7874d0wb6375d6c603101d4@mail.gmail.com> Message-ID: <454A1605.8070004@smiths-aerospace.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Grant Likely wrote: > On 10/31/06, Jerry Van Baren wrote: >> Add a oftdump (open firmware flattened tree dump) command. >> >> Git repository: >> >> >> >> Branch: of-cmd >> >> >> >> Signed-off-by: Jerry Van Baren > > Not that I have any authority on this, but I'm going to NAK it (for > right now). Others may disagree. > > The global statics really bother me, and I'll take a look myself if > there is a better way. Give me a few days. > > Cheers, > g. Hi Grant, Global static is a oxymoron, they are "global" only in the ft_build.c file starting at ft_dump_blob() and going to the end of the file. I suspect what you are concerned about is the shared aspect, which isn't a problem in u-boot since it is single threaded. There are three choices: 1) "Global statics" - easiest and least memory use, but makes Good Engineers[tm] queasy. 2) "Duplicate" the arrays (currently 2x256, becomes 4x256) as statics inside the two functions - uses 2x the memory with no benefit (still makes Good Engineers[tm] queasy, just a different queasy). 3) More clever matching on the parameter string vs. the OF blob where the string is built up - I bailed out on this, but it is the best solution. I know your type, you are just challenging me to actually do #3. ;-) Best regards, gvb