subsys: dfu: boot: Remove unused ver query code.

Duplicate code to query was mistakenly added in commit
2ad7ccdb2d.  This code is redundant; the
existing `boot_read_bank_header()` function can read the version from
both image banks.

Signed-off-by: Christopher Collins <ccollins@apache.org>
This commit is contained in:
Christopher Collins 2018-02-21 12:45:26 -08:00 committed by Anas Nashif
commit f31245d365
2 changed files with 0 additions and 23 deletions

View file

@ -76,7 +76,6 @@ struct mcuboot_v1_raw_header {
#define FLASH_STATE_OFFSET (FLASH_AREA_IMAGE_SCRATCH_OFFSET +\
FLASH_AREA_IMAGE_SCRATCH_SIZE)
#define VERSION_OFFSET(bank_offs) (bank_offs + 20)
#define COPY_DONE_OFFS(bank_offs) (bank_offs + FLASH_BANK_SIZE -\
BOOT_MAGIC_SZ - BOOT_MAX_ALIGN * 2)
@ -253,14 +252,6 @@ static int boot_copy_done_read(u32_t bank_offs)
return boot_flag_read(BOOT_FLAG_COPY_DONE, bank_offs);
}
static int boot_version_read(u32_t bank_offs, struct image_version *out_ver)
{
u32_t offs;
offs = VERSION_OFFSET(bank_offs);
return flash_read(flash_dev, offs, out_ver, sizeof(*out_ver));
}
static int boot_magic_write(u32_t bank_offs)
{
u32_t offs;
@ -412,11 +403,6 @@ static int boot_read_swap_state(u32_t bank_offs, struct boot_swap_state *state)
return 0;
}
int boot_current_image_version(struct image_version *out_ver)
{
return boot_version_read(FLASH_BANK0_OFFSET, out_ver);
}
int boot_swap_type(void)
{
const struct boot_swap_table *table;