From: Lukasz Majewski Date: Wed, 8 Jul 2015 21:43:18 +0000 (+0200) Subject: dfu: Delete superfluous initialization of the dfu_buf_size static variable X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=a7e6892ffb625e5a335538f937d56005aa1480c5;p=project%2Fbcm63xx%2Fu-boot.git dfu: Delete superfluous initialization of the dfu_buf_size static variable After extension of the dfu_get_buf() to also setup (implicitly) the dfu_buf_size variable it is not needed to set dfu_buf_size to CONFIG_SYS_DFU_DATA_BUF_SIZE. This variable is set in the dfu_get_buf() by not only considering CONFIG_SYS_DFU_DATA_BUF but more importantly the "dfu_bufsiz" env variable. Therefore, dfu_get_buf() should be used for initialization. Signed-off-by: Lukasz Majewski Reviewed-by: Przemyslaw Marczak --- diff --git a/drivers/dfu/dfu.c b/drivers/dfu/dfu.c index 675162d927..2267dbfb51 100644 --- a/drivers/dfu/dfu.c +++ b/drivers/dfu/dfu.c @@ -76,7 +76,7 @@ int dfu_init_env_entities(char *interface, char *devstr) } static unsigned char *dfu_buf; -static unsigned long dfu_buf_size = CONFIG_SYS_DFU_DATA_BUF_SIZE; +static unsigned long dfu_buf_size; unsigned char *dfu_free_buf(void) {