Whamcloud - gitweb
LU-6210 lod: Change positional struct initializers to C99 54/23754/4
authorSteve Guminski <stephenx.guminski@intel.com>
Mon, 14 Nov 2016 18:12:28 +0000 (13:12 -0500)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 18 Jan 2017 18:59:25 +0000 (18:59 +0000)
This patch makes no functional changes.  Struct initializers in the
lod 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/lod/lod_dev.c:
struct lu_seq_range range
struct l_wait_info lwi
lustre/lod/lproc_lod.c:
static struct lprocfs_vars lprocfs_lod_osd_vars[]

Test-Parameters: trivial
Signed-off-by: Steve Guminski <stephenx.guminski@intel.com>
Change-Id: I6533b9cbfd9a98e903ba8e0f5c5d8e725226366d
Reviewed-on: https://review.whamcloud.com/23754
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
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>
lustre/lod/lproc_lod.c

index 8131cb5..0c4a391 100644 (file)
@@ -765,13 +765,13 @@ static struct lprocfs_vars lprocfs_lod_obd_vars[] = {
 };
 
 static struct lprocfs_vars lprocfs_lod_osd_vars[] = {
-       { "blocksize",          &lod_dt_blksize_fops            },
-       { "kbytestotal",        &lod_dt_kbytestotal_fops        },
-       { "kbytesfree",         &lod_dt_kbytesfree_fops         },
-       { "kbytesavail",        &lod_dt_kbytesavail_fops        },
-       { "filestotal",         &lod_dt_filestotal_fops         },
-       { "filesfree",          &lod_dt_filesfree_fops          },
-       { NULL }
+       { .name = "blocksize",   .fops = &lod_dt_blksize_fops },
+       { .name = "kbytestotal", .fops = &lod_dt_kbytestotal_fops },
+       { .name = "kbytesfree",  .fops = &lod_dt_kbytesfree_fops },
+       { .name = "kbytesavail", .fops = &lod_dt_kbytesavail_fops },
+       { .name = "filestotal",  .fops = &lod_dt_filestotal_fops },
+       { .name = "filesfree",   .fops = &lod_dt_filesfree_fops },
+       { .name = NULL }
 };
 
 static const struct file_operations lod_proc_target_fops = {