dm_remove_partmaps() is only used in devmapper.c, so make it static. It does need to be declared early, since remove_partmaps() and it call eachother. Reviewed-by: Martin Wilck <mwilck@xxxxxxxx> Signed-off-by: Benjamin Marzinski <bmarzins@xxxxxxxxxx> --- libmultipath/devmapper.c | 4 +++- libmultipath/devmapper.h | 2 -- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libmultipath/devmapper.c b/libmultipath/devmapper.c index f5b4f4c0..73bb6fe7 100644 --- a/libmultipath/devmapper.c +++ b/libmultipath/devmapper.c @@ -53,6 +53,8 @@ static int dm_cancel_remove_partmaps(const char * mapname); #define __DR_UNUSED__ __attribute__((unused)) #endif +static int dm_remove_partmaps (const char * mapname, int need_sync, + int deferred_remove); static int do_foreach_partmaps(const char * mapname, int (*partmap_func)(const char *, void *), void *data); @@ -1544,7 +1546,7 @@ remove_partmap(const char *name, void *data) return 0; } -int +static int dm_remove_partmaps (const char * mapname, int need_sync, int deferred_remove) { struct remove_data rd = { need_sync, deferred_remove }; diff --git a/libmultipath/devmapper.h b/libmultipath/devmapper.h index 9d484dab..3fc8473b 100644 --- a/libmultipath/devmapper.h +++ b/libmultipath/devmapper.h @@ -74,8 +74,6 @@ int dm_geteventnr (const char *name); int dm_is_suspended(const char *name); int dm_get_major_minor (const char *name, int *major, int *minor); char * dm_mapname(int major, int minor); -int dm_remove_partmaps (const char * mapname, int need_sync, - int deferred_remove); int dm_get_uuid(const char *name, char *uuid, int uuid_len); bool has_dm_info(const struct multipath *mpp); int dm_get_info (const char * mapname, struct dm_info *dmi); -- 2.43.0