* [U-Boot] [U-boot] [Patch] ks2_evm: board: remove sprintf for simple string
@ 2014-11-04 18:48 Ivan Khoronzhuk
2014-11-05 21:32 ` [U-Boot] [U-Boot, U-boot] " Tom Rini
0 siblings, 1 reply; 2+ messages in thread
From: Ivan Khoronzhuk @ 2014-11-04 18:48 UTC (permalink / raw)
To: u-boot
There is no reason to sprintf simple string.
Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com>
---
board/ti/ks2_evm/board.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
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);
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [U-Boot] [U-Boot, U-boot] ks2_evm: board: remove sprintf for simple string
2014-11-04 18:48 [U-Boot] [U-boot] [Patch] ks2_evm: board: remove sprintf for simple string Ivan Khoronzhuk
@ 2014-11-05 21:32 ` Tom Rini
0 siblings, 0 replies; 2+ messages in thread
From: Tom Rini @ 2014-11-05 21:32 UTC (permalink / raw)
To: u-boot
On Tue, Nov 04, 2014 at 08:48:47PM +0200, Khoronzhuk, Ivan wrote:
> There is no reason to sprintf simple string.
>
> Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com>
Applied to u-boot-ti/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20141105/996985a2/attachment.pgp>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-11-05 21:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-04 18:48 [U-Boot] [U-boot] [Patch] ks2_evm: board: remove sprintf for simple string Ivan Khoronzhuk
2014-11-05 21:32 ` [U-Boot] [U-Boot, U-boot] " Tom Rini
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.