From 0b984e927c60052ef49f30af8a18633dca599775 Mon Sep 17 00:00:00 2001 From: Sandhya Date: Wed, 26 Jun 2019 10:24:59 +0530 Subject: [PATCH] Fix compiler warnings: Indentation Change-Id: I9786e6350b77b810ec676bfb770f14a559b67514 Signed-off-by: Sandhya --- board/qca/arm/common/crashdump.c | 30 +++++++++++++++--------------- common/autoboot.c | 8 ++++---- common/cmd_flashwrite.c | 3 ++- 3 files changed, 21 insertions(+), 20 deletions(-) diff --git a/board/qca/arm/common/crashdump.c b/board/qca/arm/common/crashdump.c index f38b54a543..d9a689135d 100644 --- a/board/qca/arm/common/crashdump.c +++ b/board/qca/arm/common/crashdump.c @@ -506,24 +506,24 @@ static int do_dumpqca_data(unsigned int dump_level) { if (dumpinfo[indx].dump_level == MINIMAL_DUMP ) memaddr = dump_minimal(dumpinfo, indx); - if (dumpinfo[indx].size && memaddr) { - if(dumpinfo[indx].dump_level == MINIMAL_DUMP){ - snprintf(wlan_segment_name, sizeof(wlan_segment_name), "%lx.BIN",(long unsigned int)memaddr); - ret = dump_to_dst (dumpinfo[indx].is_aligned_access, memaddr, dumpinfo[indx].size, wlan_segment_name); - if (ret == CMD_RET_FAILURE) - goto stop_dump; - } - else { - ret = dump_to_dst (dumpinfo[indx].is_aligned_access, memaddr, dumpinfo[indx].size, dumpinfo[indx].name); - if (ret == CMD_RET_FAILURE) - goto stop_dump; - } - } - else { - ret = dump_wlan_segments(dumpinfo, indx); + if (dumpinfo[indx].size && memaddr) { + if(dumpinfo[indx].dump_level == MINIMAL_DUMP){ + snprintf(wlan_segment_name, sizeof(wlan_segment_name), "%lx.BIN",(long unsigned int)memaddr); + ret = dump_to_dst (dumpinfo[indx].is_aligned_access, memaddr, dumpinfo[indx].size, wlan_segment_name); if (ret == CMD_RET_FAILURE) goto stop_dump; } + else { + ret = dump_to_dst (dumpinfo[indx].is_aligned_access, memaddr, dumpinfo[indx].size, dumpinfo[indx].name); + if (ret == CMD_RET_FAILURE) + goto stop_dump; + } + } + else { + ret = dump_wlan_segments(dumpinfo, indx); + if (ret == CMD_RET_FAILURE) + goto stop_dump; + } } } diff --git a/common/autoboot.c b/common/autoboot.c index 2da7c2ea47..6124384fd6 100644 --- a/common/autoboot.c +++ b/common/autoboot.c @@ -375,10 +375,10 @@ void autoboot_command(const char *s) s = getenv("dump_to_flash"); if (!s) s = getenv("dump_minimal"); - if (s) { - do_dumpqca_minimal_data(s); /* write core dump data to flash */ - run_command("reset", 0); - } + if (s) { + do_dumpqca_minimal_data(s); /* write core dump data to flash */ + run_command("reset", 0); + } else dump_func(FULL_DUMP); return; diff --git a/common/cmd_flashwrite.c b/common/cmd_flashwrite.c index 5ce717df2e..669da3aae3 100644 --- a/common/cmd_flashwrite.c +++ b/common/cmd_flashwrite.c @@ -121,8 +121,9 @@ static int do_flash(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { int flash_cmd = 0; - uint32_t offset, part_size, file_size, adj_size; + uint32_t offset, part_size, adj_size; uint32_t load_addr = 0; + uint32_t file_size = 0; uint32_t size_block, start_block, file_size_cpy; char *part_name = NULL, *filesize, *loadaddr; int flash_type, ret, retn;