]> git.sur5r.net Git - u-boot/commitdiff
ks2_evm: board: remove sprintf for simple string
authorKhoronzhuk, Ivan <ivan.khoronzhuk@ti.com>
Tue, 4 Nov 2014 18:48:47 +0000 (20:48 +0200)
committerTom Rini <trini@ti.com>
Thu, 6 Nov 2014 16:04:39 +0000 (11:04 -0500)
There is no reason to sprintf simple string.

Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com>
board/ti/ks2_evm/board.c

index 40294934525c9b0518d2a53118c45c6da22fdc13..ff7bc4bb18d695feac087803a04ad37a881a1430 100644 (file)
@@ -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);