]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging: lustre: Fix sparse warnings about use of obsolete initializer
authorEmil Goode <emilgoode@gmail.com>
Sat, 27 Jul 2013 22:38:56 +0000 (00:38 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 29 Jul 2013 18:29:37 +0000 (11:29 -0700)
This patch fixes a lot of sparse warnings about use of obsolete
struct and array initializer.

Signed-off-by: Emil Goode <emilgoode@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/ldlm/ldlm_lib.c
drivers/staging/lustre/lustre/ldlm/ldlm_lock.c
drivers/staging/lustre/lustre/ldlm/ldlm_request.c
drivers/staging/lustre/lustre/libcfs/linux/linux-debug.c
drivers/staging/lustre/lustre/libcfs/linux/linux-module.c
drivers/staging/lustre/lustre/mdc/mdc_request.c

index aace5342b76a6afe0e220aca5493d7052e1f4ecb..950f90acec043ccd0e78f26c62dcda33ef2be674 100644 (file)
@@ -762,14 +762,14 @@ void target_send_reply(struct ptlrpc_request *req, int rc, int fail_id)
 EXPORT_SYMBOL(target_send_reply);
 
 ldlm_mode_t lck_compat_array[] = {
-       [LCK_EX] LCK_COMPAT_EX,
-       [LCK_PW] LCK_COMPAT_PW,
-       [LCK_PR] LCK_COMPAT_PR,
-       [LCK_CW] LCK_COMPAT_CW,
-       [LCK_CR] LCK_COMPAT_CR,
-       [LCK_NL] LCK_COMPAT_NL,
-       [LCK_GROUP] LCK_COMPAT_GROUP,
-       [LCK_COS] LCK_COMPAT_COS,
+       [LCK_EX]        = LCK_COMPAT_EX,
+       [LCK_PW]        = LCK_COMPAT_PW,
+       [LCK_PR]        = LCK_COMPAT_PR,
+       [LCK_CW]        = LCK_COMPAT_CW,
+       [LCK_CR]        = LCK_COMPAT_CR,
+       [LCK_NL]        = LCK_COMPAT_NL,
+       [LCK_GROUP]     = LCK_COMPAT_GROUP,
+       [LCK_COS]       = LCK_COMPAT_COS,
 };
 
 /**
index ce1add149f525cb9a166459fb244ea8d96e0e643..a9174209aa8f2bdb633f5aa635cb7ddbe246d3c6 100644 (file)
 
 /* lock types */
 char *ldlm_lockname[] = {
-       [0] "--",
-       [LCK_EX] "EX",
-       [LCK_PW] "PW",
-       [LCK_PR] "PR",
-       [LCK_CW] "CW",
-       [LCK_CR] "CR",
-       [LCK_NL] "NL",
-       [LCK_GROUP] "GROUP",
-       [LCK_COS] "COS"
+       [0]             = "--",
+       [LCK_EX]        = "EX",
+       [LCK_PW]        = "PW",
+       [LCK_PR]        = "PR",
+       [LCK_CW]        = "CW",
+       [LCK_CR]        = "CR",
+       [LCK_NL]        = "NL",
+       [LCK_GROUP]     = "GROUP",
+       [LCK_COS]       = "COS",
 };
 EXPORT_SYMBOL(ldlm_lockname);
 
 char *ldlm_typename[] = {
-       [LDLM_PLAIN] "PLN",
-       [LDLM_EXTENT] "EXT",
-       [LDLM_FLOCK] "FLK",
-       [LDLM_IBITS] "IBT",
+       [LDLM_PLAIN]    = "PLN",
+       [LDLM_EXTENT]   = "EXT",
+       [LDLM_FLOCK]    = "FLK",
+       [LDLM_IBITS]    = "IBT",
 };
 EXPORT_SYMBOL(ldlm_typename);
 
 static ldlm_policy_wire_to_local_t ldlm_policy_wire18_to_local[] = {
-       [LDLM_PLAIN - LDLM_MIN_TYPE] ldlm_plain_policy_wire_to_local,
-       [LDLM_EXTENT - LDLM_MIN_TYPE] ldlm_extent_policy_wire_to_local,
-       [LDLM_FLOCK - LDLM_MIN_TYPE] ldlm_flock_policy_wire18_to_local,
-       [LDLM_IBITS - LDLM_MIN_TYPE] ldlm_ibits_policy_wire_to_local,
+       [LDLM_PLAIN - LDLM_MIN_TYPE]    = ldlm_plain_policy_wire_to_local,
+       [LDLM_EXTENT - LDLM_MIN_TYPE]   = ldlm_extent_policy_wire_to_local,
+       [LDLM_FLOCK - LDLM_MIN_TYPE]    = ldlm_flock_policy_wire18_to_local,
+       [LDLM_IBITS - LDLM_MIN_TYPE]    = ldlm_ibits_policy_wire_to_local,
 };
 
 static ldlm_policy_wire_to_local_t ldlm_policy_wire21_to_local[] = {
-       [LDLM_PLAIN - LDLM_MIN_TYPE] ldlm_plain_policy_wire_to_local,
-       [LDLM_EXTENT - LDLM_MIN_TYPE] ldlm_extent_policy_wire_to_local,
-       [LDLM_FLOCK - LDLM_MIN_TYPE] ldlm_flock_policy_wire21_to_local,
-       [LDLM_IBITS - LDLM_MIN_TYPE] ldlm_ibits_policy_wire_to_local,
+       [LDLM_PLAIN - LDLM_MIN_TYPE]    = ldlm_plain_policy_wire_to_local,
+       [LDLM_EXTENT - LDLM_MIN_TYPE]   = ldlm_extent_policy_wire_to_local,
+       [LDLM_FLOCK - LDLM_MIN_TYPE]    = ldlm_flock_policy_wire21_to_local,
+       [LDLM_IBITS - LDLM_MIN_TYPE]    = ldlm_ibits_policy_wire_to_local,
 };
 
 static ldlm_policy_local_to_wire_t ldlm_policy_local_to_wire[] = {
-       [LDLM_PLAIN - LDLM_MIN_TYPE] ldlm_plain_policy_local_to_wire,
-       [LDLM_EXTENT - LDLM_MIN_TYPE] ldlm_extent_policy_local_to_wire,
-       [LDLM_FLOCK - LDLM_MIN_TYPE] ldlm_flock_policy_local_to_wire,
-       [LDLM_IBITS - LDLM_MIN_TYPE] ldlm_ibits_policy_local_to_wire,
+       [LDLM_PLAIN - LDLM_MIN_TYPE]    = ldlm_plain_policy_local_to_wire,
+       [LDLM_EXTENT - LDLM_MIN_TYPE]   = ldlm_extent_policy_local_to_wire,
+       [LDLM_FLOCK - LDLM_MIN_TYPE]    = ldlm_flock_policy_local_to_wire,
+       [LDLM_IBITS - LDLM_MIN_TYPE]    = ldlm_ibits_policy_local_to_wire,
 };
 
 /**
index c900706a9c8d301323a36ec725454327b0c8d560..6f21a1204a645b9d8fe411cfbdc6a86fedccb567 100644 (file)
@@ -2068,7 +2068,10 @@ void ldlm_namespace_foreach(struct ldlm_namespace *ns,
                            ldlm_iterator_t iter, void *closure)
 
 {
-       struct iter_helper_data helper = { iter: iter, closure: closure };
+       struct iter_helper_data helper = {
+               .iter           = iter,
+               .closure        = closure,
+       };
 
        cfs_hash_for_each_nolock(ns->ns_rs_hash,
                                 ldlm_res_iter_helper, &helper);
index 6afb350731418850e5daad3e2884568a7548dd37..9b57304e6caa26c7b56fc27e52c8a7a18ff713a6 100644 (file)
@@ -194,9 +194,9 @@ static int panic_notifier(struct notifier_block *self, unsigned long unused1,
 }
 
 static struct notifier_block libcfs_panic_notifier = {
-       notifier_call :     panic_notifier,
-       next :        NULL,
-       priority :        10000
+       .notifier_call  = panic_notifier,
+       .next           = NULL,
+       .priority       = 10000,
 };
 
 void libcfs_register_panic_notifier(void)
index d8f320e6f4b61e0f1f63b8dd12936c5e338b41f2..7449f4f1864027b721975fcd46161299a5dc77d1 100644 (file)
@@ -171,9 +171,9 @@ static long libcfs_ioctl(struct file *file,
 }
 
 static struct file_operations libcfs_fops = {
-       unlocked_ioctl: libcfs_ioctl,
-       open :    libcfs_psdev_open,
-       release :       libcfs_psdev_release
+       .unlocked_ioctl = libcfs_ioctl,
+       .open           = libcfs_psdev_open,
+       .release        = libcfs_psdev_release,
 };
 
 struct miscdevice libcfs_dev = {
index 191edc6470cd0984e75d1d8697a444df1dc33bd2..2dabfc01d224df51473b3d4d0d3a875e05d7f2b2 100644 (file)
@@ -2378,7 +2378,7 @@ static int mdc_resource_inode_free(struct ldlm_resource *res)
 }
 
 struct ldlm_valblock_ops inode_lvbo = {
-       lvbo_free: mdc_resource_inode_free
+       .lvbo_free = mdc_resource_inode_free,
 };
 
 static int mdc_setup(struct obd_device *obd, struct lustre_cfg *cfg)