staging: lustre: fid: Change positional struct initializers to C99
authorSteve Guminski <stephenx.guminski@intel.com>
Sun, 29 Jan 2017 00:05:22 +0000 (19:05 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 3 Feb 2017 12:01:38 +0000 (13:01 +0100)
This patch makes no functional changes.  Struct initializers in the
fid directory that use C89 or GCC-only syntax are updated to C99
syntax.

The C99 syntax prevents incorrect initialization if values are
accidently placed in the wrong position, allows changes in the struct
definition, and clears any members that are not given an explicit
value.

The following struct initializers have been updated:

lustre/fid/fid_lib.c:
        const struct lu_seq_range LUSTRE_SEQ_SPACE_RANGE
        const struct lu_seq_range LUSTRE_SEQ_ZERO_RANGE
lustre/fid/lproc_fid.c:
        struct lprocfs_vars seq_client_debugfs_list

Signed-off-by: Steve Guminski <stephenx.guminski@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6210
Reviewed-on: https://review.whamcloud.com/23789
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/fid/fid_lib.c
drivers/staging/lustre/lustre/fid/lproc_fid.c

index 4e49cb356d64f4d50506157995babb64a70ad45d..9eb405905d1a9b66c3930c71baa612328de50008 100644 (file)
  * FID_SEQ_START + 2 is for .lustre directory and its objects
  */
 const struct lu_seq_range LUSTRE_SEQ_SPACE_RANGE = {
-       FID_SEQ_NORMAL,
-       (__u64)~0ULL
+       .lsr_start      = FID_SEQ_NORMAL,
+       .lsr_end        = (__u64)~0ULL,
 };
 
 /* Zero range, used for init and other purposes. */
 const struct lu_seq_range LUSTRE_SEQ_ZERO_RANGE = {
-       0,
-       0
+       .lsr_start      = 0,
 };
 
 /* Lustre Big Fs Lock fid. */
index 97d4849c7199e081232c582ce2340ffe02b83d46..3eed8380854514685fd2a421229f1cb8a54b3acc 100644 (file)
@@ -203,9 +203,13 @@ LPROC_SEQ_FOPS_RO(ldebugfs_fid_server);
 LPROC_SEQ_FOPS_RO(ldebugfs_fid_fid);
 
 struct lprocfs_vars seq_client_debugfs_list[] = {
-       { "space", &ldebugfs_fid_space_fops },
-       { "width", &ldebugfs_fid_width_fops },
-       { "server", &ldebugfs_fid_server_fops },
-       { "fid", &ldebugfs_fid_fid_fops },
+       { .name =       "space",
+         .fops =       &ldebugfs_fid_space_fops },
+       { .name =       "width",
+         .fops =       &ldebugfs_fid_width_fops },
+       { .name =       "server",
+         .fops =       &ldebugfs_fid_server_fops },
+       { .name =       "fid",
+         .fops =       &ldebugfs_fid_fid_fops },
        { NULL }
 };