staging: lustre: Fix sparse warnings about use of obsolete initializer
Subsystems (2)
PATCH v2 2/2 staging: lustre: Fix sparse warnings about use of obsolete initializer
This patch fixes a lot of sparse warnings about use of obsolete struct and array initializer.
Signed-off-by Emil Goode <[email protected]>
---
v2: I forgot to mention this also fixes warnings about array initializer.
drivers/staging/lustre/lustre/ldlm/ldlm_lib.c | 16 +++---- drivers/staging/lustre/lustre/ldlm/ldlm_lock.c | 50 ++++++++++---------- drivers/staging/lustre/lustre/ldlm/ldlm_request.c | 5 +- .../lustre/lustre/libcfs/linux/linux-debug.c | 6 +-- .../lustre/lustre/libcfs/linux/linux-module.c | 6 +-- drivers/staging/lustre/lustre/mdc/mdc_request.c | 2 +- 6 files changed, 44 insertions(+), 41 deletions(-)
drivers/staging/lustre/lustre/ldlm/ldlm_lib.c +8 -8
@@ -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 , };/**
drivers/staging/lustre/lustre/ldlm/ldlm_lock.c +25 -25
70 lines not on this page · raw message
drivers/staging/lustre/lustre/ldlm/ldlm_request.c +4 -1
@@ -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);
drivers/staging/lustre/lustre/libcfs/linux/linux-debug.c +3 -3
@@ -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 )
drivers/staging/lustre/lustre/libcfs/linux/linux-module.c +3 -3
@@ -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 = {
drivers/staging/lustre/lustre/mdc/mdc_request.c +1 -1
@@ -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)
Signature · 1 line
1.7.10.4