From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Warren Date: Thu, 14 Jun 2012 17:51:24 -0600 Subject: [U-Boot] [PATCH v2 14/19] lcd: Add support for flushing LCD fb from dcache after update In-Reply-To: <1339604395-6621-15-git-send-email-sjg@chromium.org> References: <1339604395-6621-1-git-send-email-sjg@chromium.org> <1339604395-6621-15-git-send-email-sjg@chromium.org> Message-ID: <4FDA78FC.5090102@wwwdotorg.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 06/13/2012 10:19 AM, Simon Glass wrote: > This provides an option for the LCD to flush the dcache after each update > (puts, scroll or clear). > diff --git a/common/cmd_echo.c b/common/cmd_echo.c > + /* Use puts() so that the LCD sees it as a new line */ > if (putnl) > - putc('\n'); > + puts("\n"); That seems fragile - what if someone comes along and uses putc() in some other code without having a clue that this requirement exists? What stops putc() from detecting \n just like puts()?