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().
Signed-off-by: Marti Bolivar <marti.bolivar@linaro.org>
diff --git a/boot/zephyr/flash_map.c b/boot/zephyr/flash_map.c
index 872c80d..17cb32a 100644
--- a/boot/zephyr/flash_map.c
+++ b/boot/zephyr/flash_map.c
@@ -61,7 +61,7 @@
{
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 @@
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 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 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 @@
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 @@
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;
}