zephyr: flash_map: fix up logging
The Zephyr log backend already prepends the function, so it's
redundant to do it here.
Also convert a stray SYS_LOG_ERR to BOOT_LOG_ERR().
@@ -61,7 +61,7 @@ int flash_area_open(uint8_t id, const struct flash_area **area)
{
int i;
- BOOT_LOG_DBG("%s: area %d", __func__, id);
+ BOOT_LOG_DBG("area %d", id);
for (i = 0; i < ARRAY_SIZE(part_map); i++) {
if (id == part_map[i].fa_id)
@@ -84,8 +84,7 @@ void flash_area_close(const struct flash_area *area)
int flash_area_read(const struct flash_area *area, uint32_t off, void *dst,
uint32_t len)
{
- BOOT_LOG_DBG("%s: area=%d, off=%x, len=%x", __func__,
- area->fa_id, off, len);
+ BOOT_LOG_DBG("area=%d, off=%x, len=%x", area->fa_id, off, len);
return flash_read(boot_flash_device, area->fa_off + off, dst, len);
}
@@ -94,8 +93,7 @@ int flash_area_write(const struct flash_area *area, uint32_t off, const void *sr
{
int rc = 0;
- BOOT_LOG_DBG("%s: area=%d, off=%x, len=%x", __func__,
- area->fa_id, off, len);
+ BOOT_LOG_DBG("area=%d, off=%x, len=%x", area->fa_id, off, len);
flash_write_protection_set(boot_flash_device, false);
rc = flash_write(boot_flash_device, area->fa_off + off, src, len);
flash_write_protection_set(boot_flash_device, true);
@@ -106,8 +104,7 @@ int flash_area_erase(const struct flash_area *area, uint32_t off, uint32_t len)
{
int rc;
- BOOT_LOG_DBG("%s: area=%d, off=%x, len=%x", __func__,
- area->fa_id, off, len);
+ BOOT_LOG_DBG("area=%d, off=%x, len=%x", area->fa_id, off, len);
flash_write_protection_set(boot_flash_device, false);
rc = flash_erase(boot_flash_device, area->fa_off + off, len);
flash_write_protection_set(boot_flash_device, true);
@@ -140,7 +137,7 @@ int flash_area_to_sectors(int idx, int *cnt, struct flash_area *ret)
uint32_t len;
uint32_t max_cnt = *cnt;
- BOOT_LOG_DBG("%s: lookup area %d", __func__, idx);
+ BOOT_LOG_DBG("lookup area %d", idx);
/*
* This simple layout has uniform slots, so just fill in the
* right one.
@@ -165,7 +162,7 @@ int flash_area_to_sectors(int idx, int *cnt, struct flash_area *ret)
len = FLASH_AREA_IMAGE_SCRATCH_SIZE;
break;
default:
- SYS_LOG_ERR("%s: unknown flash area %d", __func__, idx);
+ BOOT_LOG_ERR("unknown flash area %d", idx);
return -1;
}
