Commit 4873972b authored by Julia Lawall's avatar Julia Lawall Committed by Greg Kroah-Hartman

lustre: obdclass: use c99 initializers in structures

Use c99 initializers for structures.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@decl@
identifier i1,fld;
type T;
field list[n] fs;
@@

struct i1 {
 fs
 T fld;
 ...};

@bad@
identifier decl.i1,i2;
expression e;
initializer list[decl.n] is;
@@

struct i1 i2 = { is,
+ .fld = e
- e
 ,...};
// </smpl>
Signed-off-by: default avatarJulia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 9d0b2b7a
......@@ -1572,7 +1572,10 @@ lproc_exp_hash_seq_show(struct seq_file *m, void *unused)
{
struct nid_stat *stats = (struct nid_stat *)m->private;
struct obd_device *obd = stats->nid_obd;
struct exp_hash_cb_data cb_data = {m, true};
struct exp_hash_cb_data cb_data = {
.m = m,
.first = true
};
cfs_hash_for_each_key(obd->obd_nid_hash, &stats->nid,
lprocfs_exp_print_hash, &cb_data);
......
......@@ -1276,7 +1276,10 @@ EXPORT_SYMBOL(lustre_register_kill_super_cb);
struct dentry *lustre_mount(struct file_system_type *fs_type, int flags,
const char *devname, void *data)
{
struct lustre_mount_data2 lmd2 = { data, NULL };
struct lustre_mount_data2 lmd2 = {
.lmd2_data = data,
.lmd2_mnt = NULL
};
return mount_nodev(fs_type, flags, &lmd2, lustre_fill_super);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment