misc: platform_write: remove unused buffer
authorPrzemyslaw Marczak <p.marczak@samsung.com>
Fri, 28 Nov 2014 12:49:07 +0000 (13:49 +0100)
committerChanho Park <chanho61.park@samsung.com>
Wed, 10 Dec 2014 09:02:32 +0000 (18:02 +0900)
Change-Id: Ib9f90415b92ec1d67a9bf6b84e7ab5d5deea8a7d
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
board/samsung/common/misc.c

index c777ef6ffeb752723276e7b1c751b6d903c11dfc..8c4892be3cc05a2f326a81dede64cfaad2b162b0 100644 (file)
@@ -57,9 +57,7 @@ static char *getenv_by_args(const char *fmt, ...)
 
 static int platform_write(bool save_env)
 {
-       int buf_len = PLATFORM_SETUP_STR_BUF_LEN;
        int ret = 0;
-       char buf[buf_len];
        char *env_setup_active;
        char *platname;
        char *partitions;
@@ -74,7 +72,8 @@ static int platform_write(bool save_env)
        env_setup_active = getenv_by_args("%s_setup_active", platname);
        if (!env_setup_active) {
                printf("Platform active configuration not found\n");
-               printf("Check your setup and set: ${%s} number\n", buf);
+               printf("Check your setup and set: ${%s_setup_active} number\n",
+                      platname);
                printf("Then run: \"platform setup; platform write env\"\n");
                return CMD_RET_FAILURE;
        }
@@ -163,7 +162,8 @@ int platform_setup(void)
                /* Get ${platname}_setup_N_alt_system */
                value = getenv_by_args("%s_setup_%d_alt_system", platname, i);
                if (!value) {
-                       printf("%s - not found!\n", buf);
+                       printf("%s_setup_%d_alt_system - not found!\n",
+                              platname, i);
                        return CMD_RET_FAILURE;
                }