From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Fri, 10 Oct 2014 16:26:41 +0200 Subject: [U-Boot] Discussion topics / issues In-Reply-To: <5437E778.3050306@myspectrum.nl> References: <201410071445.50854.marex@denx.de> <20141010122229.B60DC38352B@gemini.denx.de> <5437E778.3050306@myspectrum.nl> Message-ID: <201410101626.41944.marex@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 On Friday, October 10, 2014 at 04:04:40 PM, Jeroen Hofstee wrote: > Hello Wolfgang, > > On 10-10-14 14:22, Wolfgang Denk wrote: > >> It does not mention puts() vs. printf(), if it is indeed meant to be > >> u-boot policy. > > > > This is not just U-Boot philosophy, but something that I would > > consider a matter of course when writing code - using the appropriate > > tools for the task at hand. If all you want to do is sendout a > > constant string to the utput device, there is no need to invoke a > > function that provides fancy formatting options. > > > > Don't we always try to use the smallest, most efficient tool that is > > suited for a task? > > calling printf("%s\n", "string") gets translated into puts by the > compiler. There should be no difference in the binary. Is this LLVM specific or does GCC do that too ? This is interesting information. Best regards, Marek Vasut