From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ivan Khoronzhuk Date: Tue, 4 Nov 2014 19:05:55 +0200 Subject: [U-Boot] [U-boot] [Patch] keystone2: replace printf on puts where it's possible In-Reply-To: <20141104164632.GD15133@bill-the-cat> References: <1415058293-923-1-git-send-email-ivan.khoronzhuk@ti.com> <20141104164632.GD15133@bill-the-cat> Message-ID: <54590773.7030504@ti.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/04/2014 06:46 PM, Tom Rini wrote: > On Tue, Nov 04, 2014 at 01:44:53AM +0200, Ivan Khoronzhuk wrote: > >> It is better to use simple puts() function instead of printf() >> when it's possible. Also remove redundant sprintf(). >> >> Signed-off-by: Ivan Khoronzhuk > One of the outcomes of the mini-summit and I think was summarized on the > list as well was that we're going to stop with the "use puts instead of > printf!" thing as it ends up being more annoying to contributors than > useful in terms of functionality and code size. > >> diff --git a/board/ti/ks2_evm/board.c b/board/ti/ks2_evm/board.c >> index 4029493..ff7bc4b 100644 >> --- a/board/ti/ks2_evm/board.c >> +++ b/board/ti/ks2_evm/board.c >> @@ -122,7 +122,6 @@ void ft_board_setup(void *blob, bd_t *bd) >> int nbanks; >> u64 size[2]; >> u64 start[2]; >> - char name[32]; >> int nodeoffset; >> u32 ddr3a_size; >> int unitrd_fixup = 0; >> @@ -158,15 +157,13 @@ void ft_board_setup(void *blob, bd_t *bd) >> } >> >> /* reserve memory at start of bank */ >> - sprintf(name, "mem_reserve_head"); >> - env = getenv(name); >> + env = getenv("mem_reserve_head"); >> if (env) { >> start[0] += ustrtoul(env, &endp, 0); >> size[0] -= ustrtoul(env, &endp, 0); >> } >> >> - sprintf(name, "mem_reserve"); >> - env = getenv(name); >> + env = getenv("mem_reserve"); >> if (env) >> size[0] -= ustrtoul(env, &endp, 0); > This is good to fix however. > Ok, Reject this patch. I will send new patch that delete only sprintf. Thanks! -- Regards, Ivan Khoronzhuk