From: Wolfgang Denk Date: Thu, 05 Nov 2009 21:24:20 +0100 Subject: [U-Boot] [PATCH 1/2] ARM Conditionally compile board LED functions In-Reply-To: <1257292804-10612-2-git-send-email-Tom.Rix@windriver.com> References: <1257292804-10612-1-git-send-email-Tom.Rix@windriver.com> <1257292804-10612-2-git-send-email-Tom.Rix@windriver.com> Message-ID: <20091105202420.0842A3F6EC@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Tom Rix, In message <1257292804-10612-2-git-send-email-Tom.Rix@windriver.com> you wrote: > The ARM board LED functions are defined as weak. > They add a size overhead if they are not used. > > Now they are only defined if CONFIG_STATUS_LED is also defined. > > The arm920t and arm926ejs _start function calls these LED functions > > bl coloured_LED_init > bl red_LED_on > > In general, what happens is they call into the weak > stubs. Only if the cpu/board provides an overriding > function do these calls cause anything meaningful to > happen. > > Now this noop case is removed and these LED functions are excuted > only when CONFIG_STATUS_LED is defined I don't get it. We use "weak" to avoid #ifdef's, and you insert new #ifdef's? That seems to be the wrong approach to me. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de "What if" is a trademark of Hewlett Packard, so stop using it in your sentences without permission, or risk being sued.