This is an automated email from the ASF dual-hosted git repository. ccollins pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/mynewt-core.git
The following commit(s) were added to refs/heads/master by this push: new cf813a4 Redefine `flash_area_close()` as an empty macro cf813a4 is described below commit cf813a446112b1a02523a7184d486528140d9909 Author: Christopher Collins <ccoll...@apache.org> AuthorDate: Mon Dec 10 19:02:04 2018 -0800 Redefine `flash_area_close()` as an empty macro Prior to this commit, `flash_area_close()` was a function with an empty body. To save code space in the boot loader, remove this function, and define it as an empty macro instead. If `flash_area_close()` ever needs to perform a task, the macro can be removed and the function re-implemented. --- sys/flash_map/include/flash_map/flash_map.h | 3 ++- sys/flash_map/src/flash_map.c | 6 ------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/sys/flash_map/include/flash_map/flash_map.h b/sys/flash_map/include/flash_map/flash_map.h index 4cc5b42..217cf53 100644 --- a/sys/flash_map/include/flash_map/flash_map.h +++ b/sys/flash_map/include/flash_map/flash_map.h @@ -75,7 +75,8 @@ void flash_map_init(void); */ int flash_area_open(uint8_t id, const struct flash_area **); -void flash_area_close(const struct flash_area *); +/** nothing to do for now */ +#define flash_area_close(flash_area) /* * Read/write/erase. Offset is relative from beginning of flash area. diff --git a/sys/flash_map/src/flash_map.c b/sys/flash_map/src/flash_map.c index 9575aa5..1cab37e 100644 --- a/sys/flash_map/src/flash_map.c +++ b/sys/flash_map/src/flash_map.c @@ -52,12 +52,6 @@ flash_area_open(uint8_t id, const struct flash_area **fap) return SYS_ENOENT; } -void -flash_area_close(const struct flash_area *fa) -{ - /* nothing to do for now */ -} - int flash_area_to_sectors(int id, int *cnt, struct flash_area *ret) {