Skip to content

Commit aef9e80

Browse files
committed
flash_map_backend: Remove flash_area_id_to_multi_image_slot
The function has not been in use and some ports have not been implementing it anyway. Signed-off-by: Dominik Ermel <[email protected]>
1 parent 46e554e commit aef9e80

File tree

7 files changed

+0
-26
lines changed

7 files changed

+0
-26
lines changed

boot/cypress/cy_flash_pal/cy_flash_map.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -438,11 +438,6 @@ int flash_area_id_to_multi_image_slot(int image_index, int area_id)
438438
return -1;
439439
}
440440

441-
int flash_area_id_to_image_slot(int area_id)
442-
{
443-
return flash_area_id_to_multi_image_slot(0, area_id);
444-
}
445-
446441
uint8_t flash_area_erased_val(const struct flash_area *fap)
447442
{
448443
int ret = 0;

boot/cypress/cy_flash_pal/include/flash_map_backend/flash_map_backend.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,6 @@ uint32_t flash_area_align(const struct flash_area *);
172172
int flash_area_to_sectors(int idx, int *cnt, struct flash_area *ret);
173173
/*< Returns the `fa_id` for slot, where slot is 0 (primary) or 1 (secondary) */
174174
int flash_area_id_from_image_slot(int slot);
175-
/*< Returns the slot, for the `fa_id` supplied */
176-
int flash_area_id_to_image_slot(int area_id);
177175

178176
int flash_area_id_from_multi_image_slot(int image_index, int slot);
179177
int flash_area_id_to_multi_image_slot(int image_index, int area_id);

boot/mbed/include/flash_map_backend/flash_map_backend.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,6 @@ int flash_area_id_from_image_slot(int slot);
161161
int flash_area_id_from_multi_image_slot(int image_index, int slot);
162162

163163

164-
int flash_area_id_to_image_slot(int area_id);
165164
/**
166165
* Converts the specified flash area ID and image index (in multi-image setup)
167166
* to an image slot index.

boot/mbed/src/flash_map_backend.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -231,10 +231,6 @@ int flash_area_id_from_image_slot(int slot) {
231231
return slot;
232232
}
233233

234-
int flash_area_id_to_image_slot(int area_id) {
235-
return area_id;
236-
}
237-
238234
/**
239235
* Multi images support not implemented yet
240236
*/

boot/zephyr/flash_map_extended.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,6 @@ int flash_area_id_to_multi_image_slot(int image_index, int area_id)
8383
return -1;
8484
}
8585

86-
int flash_area_id_to_image_slot(int area_id)
87-
{
88-
return flash_area_id_to_multi_image_slot(0, area_id);
89-
}
90-
9186
#if defined(CONFIG_MCUBOOT_SERIAL_DIRECT_IMAGE_UPLOAD)
9287
int flash_area_id_from_direct_image(int image_id)
9388
{

boot/zephyr/include/flash_map_backend/flash_map_backend.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,6 @@ int flash_device_base(uint8_t fd_id, uintptr_t *ret);
4747
int flash_area_id_from_image_slot(int slot);
4848
int flash_area_id_from_multi_image_slot(int image_index, int slot);
4949

50-
/**
51-
* Converts the specified flash area ID to an image slot index.
52-
*
53-
* Returns image slot index (0 or 1), or -1 if ID doesn't correspond to an image
54-
* slot.
55-
*/
56-
int flash_area_id_to_image_slot(int area_id);
57-
5850
/**
5951
* Converts the specified flash area ID and image index (in multi-image setup)
6052
* to an image slot index.

sim/mcuboot-sys/csupport/storage/flash_map.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,6 @@ int flash_area_to_sectors(int idx, int *cnt, struct flash_area *ret);
152152

153153
int flash_area_id_from_image_slot(int slot);
154154
int flash_area_id_from_multi_image_slot(int image_index, int slot);
155-
int flash_area_id_to_image_slot(int area_id);
156155
int flash_area_id_to_multi_image_slot(int image_index, int area_id);
157156

158157
#ifdef __cplusplus

0 commit comments

Comments
 (0)