Details
-
Task
-
Resolution: Fixed
-
Minor
-
None
-
17372
Description
In the libcfs and lnet code there are many places where positional struct initializers are used instead of named C99 initializers:
static struct netstrfns libcfs_netstrfns[] = { {/* .nf_type */ LOLND, /* .nf_name */ "lo", /* .nf_modname */ "klolnd", /* .nf_addr2str */ libcfs_decnum_addr2str, /* .nf_str2addr */ libcfs_lo_str2addr, /* .nf_parse_addr*/ libcfs_num_parse, /* .nf_print_addrlist*/ libcfs_num_addr_range_print, /* .nf_match_addr*/ libcfs_num_match, /* .nf_is_contiguous */ cfs_num_is_contiguous, /* .nf_min_max */ cfs_num_min_max},
instead of
static struct netstrfns libcfs_netstrfns[] = { { .nf_type = LOLND, .nf_name = "lo", .nf_modname = "klolnd", .nf_addr2str = libcfs_decnum_addr2str, .nf_str2addr = libcfs_lo_str2addr, .nf_parse_addr = libcfs_num_parse, .nf_print_addrlist = libcfs_num_addr_range_print, .nf_match_addr = libcfs_num_match, .nf_is_contiguous = cfs_num_is_contiguous, .nf_min_max = cfs_num_min_max},
This was done because WinNT didn't have C99 initializer support, but we don't care about that anymore.
All of the positional struct initializers in libcfs, lnet, and lustre should be changed to named initializers, probably in several independent patches for different subdirectories.
John L. Hammond (john.hammond@intel.com) merged in patch https://review.whamcloud.com/30499/
Subject:
LU-6210utils: Use C99 struct initializers in lfs_hsm_state()Project: fs/lustre-release
Branch: b2_10
Current Patch Set:
Commit: 924586bdcc5a053bc06ef7c73ae2112866b880c5