]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
Staging: lustre: config: Remove unnecessary wrapper functions
authorShivani Bhardwaj <shivanib134@gmail.com>
Thu, 29 Oct 2015 06:58:31 +0000 (12:28 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 16 Nov 2015 04:02:47 +0000 (20:02 -0800)
Remove the function lnet_ipaddr_free_enumeration() and replace all its
calls with LIBCFS_FREE().

Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lnet/lnet/config.c

index 1b3bc8386524f90707b4959523104e76dc0bdeaa..4e8b54b86c7d1de2d7ec8664d11d45573f9f5514 100644 (file)
@@ -1103,12 +1103,6 @@ lnet_match_networks(char **networksp, char *ip2nets, __u32 *ipaddrs, int nip)
        return count;
 }
 
-static void
-lnet_ipaddr_free_enumeration(__u32 *ipaddrs, int nip)
-{
-       LIBCFS_FREE(ipaddrs, nip * sizeof(*ipaddrs));
-}
-
 static int
 lnet_ipaddr_enumerate(__u32 **ipaddrsp)
 {
@@ -1169,7 +1163,7 @@ lnet_ipaddr_enumerate(__u32 **ipaddrsp)
                                rc = nip;
                        }
                }
-               lnet_ipaddr_free_enumeration(ipaddrs, nif);
+               LIBCFS_FREE(ipaddrs, nip * sizeof(*ipaddrs));
        }
        return nip;
 }
@@ -1195,7 +1189,7 @@ lnet_parse_ip2nets(char **networksp, char *ip2nets)
        }
 
        rc = lnet_match_networks(networksp, ip2nets, ipaddrs, nip);
-       lnet_ipaddr_free_enumeration(ipaddrs, nip);
+       LIBCFS_FREE(ipaddrs, nip * sizeof(*ipaddrs));
 
        if (rc < 0) {
                LCONSOLE_ERROR_MSG(0x119, "Error %d parsing ip2nets\n", rc);