From: Peter Tyser Date: Fri, 15 Aug 2008 17:27:33 -0500 Subject: [U-Boot] [PATCH] Replace references to extern console_buffer with a function call In-Reply-To: <20080815213554.900CE243AB@gemini.denx.de> References: <> <1218829743-29488-1-git-send-email-ptyser@xes-inc.com> <20080815200501.7ECF0248CD@gemini.denx.de> <1218831956.1273.114.camel@localhost.localdomain> <20080815213554.900CE243AB@gemini.denx.de> Message-ID: <1218839253.1273.148.camel@localhost.localdomain> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de > > I'm not sure if the debug console will be accepted to mainline, but > I > > think this patch alone is an improvement over the current > implementation > > Frankly, I don't think so - it just makes the code bigger for no good > use to 99.9% of the users. > > > of using a global string and multiple external console_buffer > > references. I've always thought global variables should be avoided if > > there is a reasonable alternative > > But this is a boot loader, and size matters. I had assumed gcc/ld would be smart enough to optimize the function call away, seeing as there is no conditional code in it. I just tested, and the size was increased by 48 bytes for the MPC8548CDS reference board after applying the patch. Inlining the console_buffer_addr() didn't get rid of the 48 bytes of bloat. I guess this patch's fate will be the same as "[RFC] Add support for early serial debug console"... Thanks, Peter