From: Steve Guminski Date: Mon, 14 Nov 2016 18:12:28 +0000 (-0500) Subject: LU-6210 lod: Change positional struct initializers to C99 X-Git-Tag: 2.9.52~36 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=874690977923f9fa984f608e7bf1d6effda04e6b LU-6210 lod: Change positional struct initializers to C99 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 Change-Id: I6533b9cbfd9a98e903ba8e0f5c5d8e725226366d Reviewed-on: https://review.whamcloud.com/23754 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Nathaniel Clark Reviewed-by: James Simmons Reviewed-by: Oleg Drokin --- diff --git a/lustre/lod/lproc_lod.c b/lustre/lod/lproc_lod.c index 8131cb5..0c4a391 100644 --- a/lustre/lod/lproc_lod.c +++ b/lustre/lod/lproc_lod.c @@ -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 = {