Skip to content

Commit ad1060c

Browse files
author
J. Bruce Fields
committed
nfsd: Use C99 initializers in fs/nfsd/nfs4xdr.c
Thanks to problem report and original patch from Harvey Harrison. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Cc: Harvey Harrison <harvey.harrison@gmail.com> Cc: Benny Halevy <bhalevy@panasas.com>
1 parent 367c8c7 commit ad1060c

File tree

1 file changed

+74
-74
lines changed

1 file changed

+74
-74
lines changed

fs/nfsd/nfs4xdr.c

Lines changed: 74 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -1000,43 +1000,43 @@ nfsd4_decode_notsupp(struct nfsd4_compoundargs *argp, void *p)
10001000
typedef __be32(*nfsd4_dec)(struct nfsd4_compoundargs *argp, void *);
10011001

10021002
static nfsd4_dec nfsd4_dec_ops[] = {
1003-
[OP_ACCESS] (nfsd4_dec)nfsd4_decode_access,
1004-
[OP_CLOSE] (nfsd4_dec)nfsd4_decode_close,
1005-
[OP_COMMIT] (nfsd4_dec)nfsd4_decode_commit,
1006-
[OP_CREATE] (nfsd4_dec)nfsd4_decode_create,
1007-
[OP_DELEGPURGE] (nfsd4_dec)nfsd4_decode_notsupp,
1008-
[OP_DELEGRETURN] (nfsd4_dec)nfsd4_decode_delegreturn,
1009-
[OP_GETATTR] (nfsd4_dec)nfsd4_decode_getattr,
1010-
[OP_GETFH] (nfsd4_dec)nfsd4_decode_noop,
1011-
[OP_LINK] (nfsd4_dec)nfsd4_decode_link,
1012-
[OP_LOCK] (nfsd4_dec)nfsd4_decode_lock,
1013-
[OP_LOCKT] (nfsd4_dec)nfsd4_decode_lockt,
1014-
[OP_LOCKU] (nfsd4_dec)nfsd4_decode_locku,
1015-
[OP_LOOKUP] (nfsd4_dec)nfsd4_decode_lookup,
1016-
[OP_LOOKUPP] (nfsd4_dec)nfsd4_decode_noop,
1017-
[OP_NVERIFY] (nfsd4_dec)nfsd4_decode_verify,
1018-
[OP_OPEN] (nfsd4_dec)nfsd4_decode_open,
1019-
[OP_OPENATTR] (nfsd4_dec)nfsd4_decode_notsupp,
1020-
[OP_OPEN_CONFIRM] (nfsd4_dec)nfsd4_decode_open_confirm,
1021-
[OP_OPEN_DOWNGRADE] (nfsd4_dec)nfsd4_decode_open_downgrade,
1022-
[OP_PUTFH] (nfsd4_dec)nfsd4_decode_putfh,
1023-
[OP_PUTPUBFH] (nfsd4_dec)nfsd4_decode_notsupp,
1024-
[OP_PUTROOTFH] (nfsd4_dec)nfsd4_decode_noop,
1025-
[OP_READ] (nfsd4_dec)nfsd4_decode_read,
1026-
[OP_READDIR] (nfsd4_dec)nfsd4_decode_readdir,
1027-
[OP_READLINK] (nfsd4_dec)nfsd4_decode_noop,
1028-
[OP_REMOVE] (nfsd4_dec)nfsd4_decode_remove,
1029-
[OP_RENAME] (nfsd4_dec)nfsd4_decode_rename,
1030-
[OP_RENEW] (nfsd4_dec)nfsd4_decode_renew,
1031-
[OP_RESTOREFH] (nfsd4_dec)nfsd4_decode_noop,
1032-
[OP_SAVEFH] (nfsd4_dec)nfsd4_decode_noop,
1033-
[OP_SECINFO] (nfsd4_dec)nfsd4_decode_secinfo,
1034-
[OP_SETATTR] (nfsd4_dec)nfsd4_decode_setattr,
1035-
[OP_SETCLIENTID] (nfsd4_dec)nfsd4_decode_setclientid,
1036-
[OP_SETCLIENTID_CONFIRM](nfsd4_dec)nfsd4_decode_setclientid_confirm,
1037-
[OP_VERIFY] (nfsd4_dec)nfsd4_decode_verify,
1038-
[OP_WRITE] (nfsd4_dec)nfsd4_decode_write,
1039-
[OP_RELEASE_LOCKOWNER] (nfsd4_dec)nfsd4_decode_release_lockowner,
1003+
[OP_ACCESS] = (nfsd4_dec)nfsd4_decode_access,
1004+
[OP_CLOSE] = (nfsd4_dec)nfsd4_decode_close,
1005+
[OP_COMMIT] = (nfsd4_dec)nfsd4_decode_commit,
1006+
[OP_CREATE] = (nfsd4_dec)nfsd4_decode_create,
1007+
[OP_DELEGPURGE] = (nfsd4_dec)nfsd4_decode_notsupp,
1008+
[OP_DELEGRETURN] = (nfsd4_dec)nfsd4_decode_delegreturn,
1009+
[OP_GETATTR] = (nfsd4_dec)nfsd4_decode_getattr,
1010+
[OP_GETFH] = (nfsd4_dec)nfsd4_decode_noop,
1011+
[OP_LINK] = (nfsd4_dec)nfsd4_decode_link,
1012+
[OP_LOCK] = (nfsd4_dec)nfsd4_decode_lock,
1013+
[OP_LOCKT] = (nfsd4_dec)nfsd4_decode_lockt,
1014+
[OP_LOCKU] = (nfsd4_dec)nfsd4_decode_locku,
1015+
[OP_LOOKUP] = (nfsd4_dec)nfsd4_decode_lookup,
1016+
[OP_LOOKUPP] = (nfsd4_dec)nfsd4_decode_noop,
1017+
[OP_NVERIFY] = (nfsd4_dec)nfsd4_decode_verify,
1018+
[OP_OPEN] = (nfsd4_dec)nfsd4_decode_open,
1019+
[OP_OPENATTR] = (nfsd4_dec)nfsd4_decode_notsupp,
1020+
[OP_OPEN_CONFIRM] = (nfsd4_dec)nfsd4_decode_open_confirm,
1021+
[OP_OPEN_DOWNGRADE] = (nfsd4_dec)nfsd4_decode_open_downgrade,
1022+
[OP_PUTFH] = (nfsd4_dec)nfsd4_decode_putfh,
1023+
[OP_PUTPUBFH] = (nfsd4_dec)nfsd4_decode_notsupp,
1024+
[OP_PUTROOTFH] = (nfsd4_dec)nfsd4_decode_noop,
1025+
[OP_READ] = (nfsd4_dec)nfsd4_decode_read,
1026+
[OP_READDIR] = (nfsd4_dec)nfsd4_decode_readdir,
1027+
[OP_READLINK] = (nfsd4_dec)nfsd4_decode_noop,
1028+
[OP_REMOVE] = (nfsd4_dec)nfsd4_decode_remove,
1029+
[OP_RENAME] = (nfsd4_dec)nfsd4_decode_rename,
1030+
[OP_RENEW] = (nfsd4_dec)nfsd4_decode_renew,
1031+
[OP_RESTOREFH] = (nfsd4_dec)nfsd4_decode_noop,
1032+
[OP_SAVEFH] = (nfsd4_dec)nfsd4_decode_noop,
1033+
[OP_SECINFO] = (nfsd4_dec)nfsd4_decode_secinfo,
1034+
[OP_SETATTR] = (nfsd4_dec)nfsd4_decode_setattr,
1035+
[OP_SETCLIENTID] = (nfsd4_dec)nfsd4_decode_setclientid,
1036+
[OP_SETCLIENTID_CONFIRM] = (nfsd4_dec)nfsd4_decode_setclientid_confirm,
1037+
[OP_VERIFY] = (nfsd4_dec)nfsd4_decode_verify,
1038+
[OP_WRITE] = (nfsd4_dec)nfsd4_decode_write,
1039+
[OP_RELEASE_LOCKOWNER] = (nfsd4_dec)nfsd4_decode_release_lockowner,
10401040
};
10411041

10421042
struct nfsd4_minorversion_ops {
@@ -1045,7 +1045,7 @@ struct nfsd4_minorversion_ops {
10451045
};
10461046

10471047
static struct nfsd4_minorversion_ops nfsd4_minorversion[] = {
1048-
[0] { nfsd4_dec_ops, ARRAY_SIZE(nfsd4_dec_ops) },
1048+
[0] = { nfsd4_dec_ops, ARRAY_SIZE(nfsd4_dec_ops) },
10491049
};
10501050

10511051
static __be32
@@ -2577,42 +2577,42 @@ nfsd4_encode_noop(struct nfsd4_compoundres *resp, __be32 nfserr, void *p)
25772577
typedef __be32(* nfsd4_enc)(struct nfsd4_compoundres *, __be32, void *);
25782578

25792579
static nfsd4_enc nfsd4_enc_ops[] = {
2580-
[OP_ACCESS] (nfsd4_enc)nfsd4_encode_access,
2581-
[OP_CLOSE] (nfsd4_enc)nfsd4_encode_close,
2582-
[OP_COMMIT] (nfsd4_enc)nfsd4_encode_commit,
2583-
[OP_CREATE] (nfsd4_enc)nfsd4_encode_create,
2584-
[OP_DELEGPURGE] (nfsd4_enc)nfsd4_encode_noop,
2585-
[OP_DELEGRETURN] (nfsd4_enc)nfsd4_encode_noop,
2586-
[OP_GETATTR] (nfsd4_enc)nfsd4_encode_getattr,
2587-
[OP_GETFH] (nfsd4_enc)nfsd4_encode_getfh,
2588-
[OP_LINK] (nfsd4_enc)nfsd4_encode_link,
2589-
[OP_LOCK] (nfsd4_enc)nfsd4_encode_lock,
2590-
[OP_LOCKT] (nfsd4_enc)nfsd4_encode_lockt,
2591-
[OP_LOCKU] (nfsd4_enc)nfsd4_encode_locku,
2592-
[OP_LOOKUP] (nfsd4_enc)nfsd4_encode_noop,
2593-
[OP_LOOKUPP] (nfsd4_enc)nfsd4_encode_noop,
2594-
[OP_NVERIFY] (nfsd4_enc)nfsd4_encode_noop,
2595-
[OP_OPEN] (nfsd4_enc)nfsd4_encode_open,
2596-
[OP_OPEN_CONFIRM] (nfsd4_enc)nfsd4_encode_open_confirm,
2597-
[OP_OPEN_DOWNGRADE] (nfsd4_enc)nfsd4_encode_open_downgrade,
2598-
[OP_PUTFH] (nfsd4_enc)nfsd4_encode_noop,
2599-
[OP_PUTPUBFH] (nfsd4_enc)nfsd4_encode_noop,
2600-
[OP_PUTROOTFH] (nfsd4_enc)nfsd4_encode_noop,
2601-
[OP_READ] (nfsd4_enc)nfsd4_encode_read,
2602-
[OP_READDIR] (nfsd4_enc)nfsd4_encode_readdir,
2603-
[OP_READLINK] (nfsd4_enc)nfsd4_encode_readlink,
2604-
[OP_REMOVE] (nfsd4_enc)nfsd4_encode_remove,
2605-
[OP_RENAME] (nfsd4_enc)nfsd4_encode_rename,
2606-
[OP_RENEW] (nfsd4_enc)nfsd4_encode_noop,
2607-
[OP_RESTOREFH] (nfsd4_enc)nfsd4_encode_noop,
2608-
[OP_SAVEFH] (nfsd4_enc)nfsd4_encode_noop,
2609-
[OP_SECINFO] (nfsd4_enc)nfsd4_encode_secinfo,
2610-
[OP_SETATTR] (nfsd4_enc)nfsd4_encode_setattr,
2611-
[OP_SETCLIENTID] (nfsd4_enc)nfsd4_encode_setclientid,
2612-
[OP_SETCLIENTID_CONFIRM](nfsd4_enc)nfsd4_encode_noop,
2613-
[OP_VERIFY] (nfsd4_enc)nfsd4_encode_noop,
2614-
[OP_WRITE] (nfsd4_enc)nfsd4_encode_write,
2615-
[OP_RELEASE_LOCKOWNER] (nfsd4_enc)nfsd4_encode_noop,
2580+
[OP_ACCESS] = (nfsd4_enc)nfsd4_encode_access,
2581+
[OP_CLOSE] = (nfsd4_enc)nfsd4_encode_close,
2582+
[OP_COMMIT] = (nfsd4_enc)nfsd4_encode_commit,
2583+
[OP_CREATE] = (nfsd4_enc)nfsd4_encode_create,
2584+
[OP_DELEGPURGE] = (nfsd4_enc)nfsd4_encode_noop,
2585+
[OP_DELEGRETURN] = (nfsd4_enc)nfsd4_encode_noop,
2586+
[OP_GETATTR] = (nfsd4_enc)nfsd4_encode_getattr,
2587+
[OP_GETFH] = (nfsd4_enc)nfsd4_encode_getfh,
2588+
[OP_LINK] = (nfsd4_enc)nfsd4_encode_link,
2589+
[OP_LOCK] = (nfsd4_enc)nfsd4_encode_lock,
2590+
[OP_LOCKT] = (nfsd4_enc)nfsd4_encode_lockt,
2591+
[OP_LOCKU] = (nfsd4_enc)nfsd4_encode_locku,
2592+
[OP_LOOKUP] = (nfsd4_enc)nfsd4_encode_noop,
2593+
[OP_LOOKUPP] = (nfsd4_enc)nfsd4_encode_noop,
2594+
[OP_NVERIFY] = (nfsd4_enc)nfsd4_encode_noop,
2595+
[OP_OPEN] = (nfsd4_enc)nfsd4_encode_open,
2596+
[OP_OPEN_CONFIRM] = (nfsd4_enc)nfsd4_encode_open_confirm,
2597+
[OP_OPEN_DOWNGRADE] = (nfsd4_enc)nfsd4_encode_open_downgrade,
2598+
[OP_PUTFH] = (nfsd4_enc)nfsd4_encode_noop,
2599+
[OP_PUTPUBFH] = (nfsd4_enc)nfsd4_encode_noop,
2600+
[OP_PUTROOTFH] = (nfsd4_enc)nfsd4_encode_noop,
2601+
[OP_READ] = (nfsd4_enc)nfsd4_encode_read,
2602+
[OP_READDIR] = (nfsd4_enc)nfsd4_encode_readdir,
2603+
[OP_READLINK] = (nfsd4_enc)nfsd4_encode_readlink,
2604+
[OP_REMOVE] = (nfsd4_enc)nfsd4_encode_remove,
2605+
[OP_RENAME] = (nfsd4_enc)nfsd4_encode_rename,
2606+
[OP_RENEW] = (nfsd4_enc)nfsd4_encode_noop,
2607+
[OP_RESTOREFH] = (nfsd4_enc)nfsd4_encode_noop,
2608+
[OP_SAVEFH] = (nfsd4_enc)nfsd4_encode_noop,
2609+
[OP_SECINFO] = (nfsd4_enc)nfsd4_encode_secinfo,
2610+
[OP_SETATTR] = (nfsd4_enc)nfsd4_encode_setattr,
2611+
[OP_SETCLIENTID] = (nfsd4_enc)nfsd4_encode_setclientid,
2612+
[OP_SETCLIENTID_CONFIRM] = (nfsd4_enc)nfsd4_encode_noop,
2613+
[OP_VERIFY] = (nfsd4_enc)nfsd4_encode_noop,
2614+
[OP_WRITE] = (nfsd4_enc)nfsd4_encode_write,
2615+
[OP_RELEASE_LOCKOWNER] = (nfsd4_enc)nfsd4_encode_noop,
26162616
};
26172617

26182618
void

0 commit comments

Comments
 (0)