staging: lustre: move struct netstrfns to nidstr.h
authorJames Simmons <jsimmons@infradead.org>
Thu, 22 Oct 2015 01:52:43 +0000 (21:52 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 25 Oct 2015 01:52:21 +0000 (18:52 -0700)
The reason struct netstrfns exist in nidstrings.c
was to avoid forward decleration errors. The best
way to handle this instead is to move this structure
to a header file. Since this structure is used in
the userland utilities as well so we place it in
nidstr.h which is exposed to userland.

Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245
Reviewed-on: http://review.whamcloud.com/15083
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/include/linux/lnet/nidstr.h
drivers/staging/lustre/lnet/lnet/nidstrings.c

index 082782bd497866d6037ccf88125c3642a141abfc..b32f8cd037d488519f0f3777da5a321e945e28b2 100644 (file)
@@ -76,4 +76,17 @@ bool cfs_nidrange_is_contiguous(struct list_head *nidlist);
 void cfs_nidrange_find_min_max(struct list_head *nidlist, char *min_nid,
                               char *max_nid, size_t nidstr_length);
 
+struct netstrfns {
+       int     nf_type;
+       char    *nf_name;
+       char    *nf_modname;
+       void    (*nf_addr2str)(__u32 addr, char *str);
+       int     (*nf_str2addr)(const char *str, int nob, __u32 *addr);
+       int     (*nf_parse_addrlist)(char *str, int len,
+                                    struct list_head *list);
+       int     (*nf_print_addrlist)(char *buffer, int count,
+                                    struct list_head *list);
+       int     (*nf_match_addr)(__u32 addr, struct list_head *list);
+};
+
 #endif /* _LNET_NIDSTRINGS_H */
index fdbdf0668aafcfb9145d5816dd51f574d88396b7..6a778b9f8567319ec01ffcd68ac30d381d06124b 100644 (file)
@@ -208,19 +208,6 @@ libcfs_num_match(__u32 addr, struct list_head *numaddr)
        return cfs_expr_list_match(addr, el);
 }
 
-struct netstrfns {
-       int       nf_type;
-       char    *nf_name;
-       char    *nf_modname;
-       void       (*nf_addr2str)(__u32 addr, char *str);
-       int     (*nf_str2addr)(const char *str, int nob, __u32 *addr);
-       int     (*nf_parse_addrlist)(char *str, int len,
-                                       struct list_head *list);
-       int     (*nf_print_addrlist)(char *buffer, int count,
-                                    struct list_head *list);
-       int     (*nf_match_addr)(__u32 addr, struct list_head *list);
-};
-
 static struct netstrfns  libcfs_netstrfns[] = {
        {/* .nf_type      */  LOLND,
         /* .nf_name      */  "lo",