dfu: Delete superfluous initialization of the dfu_buf_size static variable
PATCH 1/1 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.
--- drivers/dfu/dfu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/dfu/dfu.c +1 -1
@@ -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 ) {
Signature · 1 line
2.1.4
PATCH 1/1 dfu: Delete superfluous initialization of the dfu_buf_size static variable
Hello Lukasz,
Quoted 18 lines · Lukasz Majewski
After extension of the
dfu_get_buf()to also setup (implicitly) thedfu_buf_sizevariable it is not needed to setdfu_buf_sizetoCONFIG_SYS_DFU_DATA_BUF_SIZE.This variable is set in the
dfu_get_buf()by not only consideringCONFIG_SYS_DFU_DATA_BUFbut more importantly the "dfu_bufsiz" env variable. Therefore,dfu_get_buf()should be used for initialization.Signed-off-by Lukasz Majewski <[email protected]>--- drivers/dfu/dfu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/dfu/dfu.c +0
-0
drivers/dfu/dfu.c int dfu_init_env_entities(char *interface, char *devstr) · line 82
Quoted 8 lines
drivers/dfu/dfu.c +1
-1@@ -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 ) {
Best regards,
Signature · 4 lines
Przemyslaw Marczak Samsung R&D Institute Poland Samsung Electronics p.marczak at samsung.com