Commit acd8f3e4 authored by Steve Guminski's avatar Steve Guminski Committed by Greg Kroah-Hartman

staging: lustre: libcfs: Change positional struct initializers to C99

This patch makes no functional changes. Struct initializers in the
libcfs 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:

libcfs/include/libcfs/libcfs_crypto.h:
        static struct cfs_crypto_hash_type hash_types[]
Signed-off-by: default avatarSteve Guminski <stephenx.guminski@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6210
Reviewed-on: https://review.whamcloud.com/23332Reviewed-by: default avatarFrank Zago <fzago@cray.com>
Reviewed-by: default avatarDmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: default avatarJames Simmons <uja.ornl@yahoo.com>
Reviewed-by: default avatarNathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: default avatarOleg Drokin <oleg.drokin@intel.com>
Signed-off-by: default avatarJames Simmons <jsimmons@infradead.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 69d3990c
......@@ -53,16 +53,56 @@ enum cfs_crypto_hash_alg {
};
static struct cfs_crypto_hash_type hash_types[] = {
[CFS_HASH_ALG_NULL] = { "null", 0, 0 },
[CFS_HASH_ALG_ADLER32] = { "adler32", 1, 4 },
[CFS_HASH_ALG_CRC32] = { "crc32", ~0, 4 },
[CFS_HASH_ALG_CRC32C] = { "crc32c", ~0, 4 },
[CFS_HASH_ALG_MD5] = { "md5", 0, 16 },
[CFS_HASH_ALG_SHA1] = { "sha1", 0, 20 },
[CFS_HASH_ALG_SHA256] = { "sha256", 0, 32 },
[CFS_HASH_ALG_SHA384] = { "sha384", 0, 48 },
[CFS_HASH_ALG_SHA512] = { "sha512", 0, 64 },
[CFS_HASH_ALG_MAX] = { NULL, 0, 64 },
[CFS_HASH_ALG_NULL] = {
.cht_name = "null",
.cht_key = 0,
.cht_size = 0
},
[CFS_HASH_ALG_ADLER32] = {
.cht_name = "adler32",
.cht_key = 1,
.cht_size = 4
},
[CFS_HASH_ALG_CRC32] = {
.cht_name = "crc32",
.cht_key = ~0,
.cht_size = 4
},
[CFS_HASH_ALG_CRC32C] = {
.cht_name = "crc32c",
.cht_key = ~0,
.cht_size = 4
},
[CFS_HASH_ALG_MD5] = {
.cht_name = "md5",
.cht_key = 0,
.cht_size = 16
},
[CFS_HASH_ALG_SHA1] = {
.cht_name = "sha1",
.cht_key = 0,
.cht_size = 20
},
[CFS_HASH_ALG_SHA256] = {
.cht_name = "sha256",
.cht_key = 0,
.cht_size = 32
},
[CFS_HASH_ALG_SHA384] = {
.cht_name = "sha384",
.cht_key = 0,
.cht_size = 48
},
[CFS_HASH_ALG_SHA512] = {
.cht_name = "sha512",
.cht_key = 0,
.cht_size = 64
},
[CFS_HASH_ALG_MAX] = {
.cht_name = NULL,
.cht_key = 0,
.cht_size = 64
},
};
/* Maximum size of hash_types[].cht_size */
......
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