From e439ba810daaebd7a51a112100a182caca72ac35 Mon Sep 17 00:00:00 2001 From: Steve Guminski Date: Thu, 10 Nov 2016 13:21:23 -0500 Subject: [PATCH] LU-6210 mdt: Change positional struct initializers to C99 This patch makes no functional changes. Struct initializers in the mdt 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/mdt/mdt_lvb.c: struct ldlm_valblock_ops mdt_lvbo lustre/mdt/mdt_mds.c: static struct lprocfs_vars lprocfs_mds_obd_vars[] Test-Parameters: trivial Signed-off-by: Steve Guminski Change-Id: If8b3b6233e34f6e8406ab6b8e4e70845bf94bfc8 Reviewed-on: https://review.whamcloud.com/23702 Tested-by: Jenkins Reviewed-by: Andreas Dilger Tested-by: Maloo Reviewed-by: James Simmons Reviewed-by: Oleg Drokin --- lustre/mdt/mdt_lvb.c | 10 +++++----- lustre/mdt/mdt_mds.c | 9 +++++++-- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/lustre/mdt/mdt_lvb.c b/lustre/mdt/mdt_lvb.c index 24b0f9a..d4c5097 100644 --- a/lustre/mdt/mdt_lvb.c +++ b/lustre/mdt/mdt_lvb.c @@ -197,9 +197,9 @@ static int mdt_lvbo_free(struct ldlm_resource *res) } struct ldlm_valblock_ops mdt_lvbo = { - lvbo_init: mdt_lvbo_init, - lvbo_update: mdt_lvbo_update, - lvbo_size: mdt_lvbo_size, - lvbo_fill: mdt_lvbo_fill, - lvbo_free: mdt_lvbo_free + .lvbo_init = mdt_lvbo_init, + .lvbo_update = mdt_lvbo_update, + .lvbo_size = mdt_lvbo_size, + .lvbo_fill = mdt_lvbo_fill, + .lvbo_free = mdt_lvbo_free }; diff --git a/lustre/mdt/mdt_mds.c b/lustre/mdt/mdt_mds.c index 1e84321..6201431 100644 --- a/lustre/mdt/mdt_mds.c +++ b/lustre/mdt/mdt_mds.c @@ -471,8 +471,13 @@ static struct lu_device *mds_device_free(const struct lu_env *env, LPROC_SEQ_FOPS_RO_TYPE(mds, uuid); static struct lprocfs_vars lprocfs_mds_obd_vars[] = { - { "uuid", &mds_uuid_fops }, - { NULL } + { + .name = "uuid", + .fops = &mds_uuid_fops + }, + { + .name = NULL + } }; static struct lu_device *mds_device_alloc(const struct lu_env *env, -- 1.8.3.1