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.
Minh Diep (minh.diep@intel.com) uploaded a new patch: https://review.whamcloud.com/30264
Subject:
LU-6210utils: Use C99 initializer for lfsck_types_namesProject: fs/lustre-release
Branch: b2_10
Current Patch Set: 1
Commit: f77870de3c743b30d2481c3c546f74a875a33af3