Commit cfa38118 authored by Shivani Bhardwaj's avatar Shivani Bhardwaj Committed by Greg Kroah-Hartman

Staging: lustre: config: Remove unnecessary wrapper functions

Remove the function lnet_ipaddr_free_enumeration() and replace all its
calls with LIBCFS_FREE().
Signed-off-by: default avatarShivani Bhardwaj <shivanib134@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 7bcd831b
...@@ -1103,12 +1103,6 @@ lnet_match_networks(char **networksp, char *ip2nets, __u32 *ipaddrs, int nip) ...@@ -1103,12 +1103,6 @@ lnet_match_networks(char **networksp, char *ip2nets, __u32 *ipaddrs, int nip)
return count; return count;
} }
static void
lnet_ipaddr_free_enumeration(__u32 *ipaddrs, int nip)
{
LIBCFS_FREE(ipaddrs, nip * sizeof(*ipaddrs));
}
static int static int
lnet_ipaddr_enumerate(__u32 **ipaddrsp) lnet_ipaddr_enumerate(__u32 **ipaddrsp)
{ {
...@@ -1169,7 +1163,7 @@ lnet_ipaddr_enumerate(__u32 **ipaddrsp) ...@@ -1169,7 +1163,7 @@ lnet_ipaddr_enumerate(__u32 **ipaddrsp)
rc = nip; rc = nip;
} }
} }
lnet_ipaddr_free_enumeration(ipaddrs, nif); LIBCFS_FREE(ipaddrs, nip * sizeof(*ipaddrs));
} }
return nip; return nip;
} }
...@@ -1195,7 +1189,7 @@ lnet_parse_ip2nets(char **networksp, char *ip2nets) ...@@ -1195,7 +1189,7 @@ lnet_parse_ip2nets(char **networksp, char *ip2nets)
} }
rc = lnet_match_networks(networksp, ip2nets, ipaddrs, nip); rc = lnet_match_networks(networksp, ip2nets, ipaddrs, nip);
lnet_ipaddr_free_enumeration(ipaddrs, nip); LIBCFS_FREE(ipaddrs, nip * sizeof(*ipaddrs));
if (rc < 0) { if (rc < 0) {
LCONSOLE_ERROR_MSG(0x119, "Error %d parsing ip2nets\n", rc); LCONSOLE_ERROR_MSG(0x119, "Error %d parsing ip2nets\n", rc);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment