From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Wood Date: Tue, 22 Nov 2011 14:20:33 -0600 Subject: [U-Boot] [PATCH v3] arm: printf() is not available in some SPL configurations In-Reply-To: <4ECB622A.3070408@gmail.com> References: <1321950379-25403-1-git-send-email-christian.riesch@omicron.at> <4ECB622A.3070408@gmail.com> Message-ID: <4ECC0411.2090100@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 11/22/2011 02:49 AM, Andreas Bie?mann wrote: > Well, you can do it that way but I guess there are several places where > printf() will be needed by some drivers in SPL. Therefore I think it is > better to provide printf() for SPL than to ifdef out all the printf's. > > So how about providing an empty > > #if !defined(CONFIG_SPL_BUILD) || defined(CONFIG_SPL_LIBCOMMON_SUPPORT) > #define printf(x) > #endif > > somewhere in the SPL code? Use an inline function instead so the arguments are consumed and it doesn't cause unused-variable warnings. -Scott