Commit 4d2b5bca authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

drivers/staging/ccree/ssi_hash.c: fix build with gcc-4.4.4

  drivers/staging/ccree/ssi_hash.c:1990: error: unknown field 'template_ahash' specified in initializer
  drivers/staging/ccree/ssi_hash.c:1991: error: unknown field 'init' specified in initializer
  drivers/staging/ccree/ssi_hash.c:1991: warning: missing braces around initializer
  drivers/staging/ccree/ssi_hash.c:1991: warning: (near initialization for 'driver_hash[0].<anonymous>.template_ahash')
  drivers/staging/ccree/ssi_hash.c:1992: error: unknown field 'update' specified in initializer
  drivers/staging/ccree/ssi_hash.c:1992: warning: excess elements in union initializer
  drivers/staging/ccree/ssi_hash.c:1992: warning: (near initialization for 'driver_hash[0].<anonymous>')
  drivers/staging/ccree/ssi_hash.c:1993: error: unknown field 'final' specified in initializer
  drivers/staging/ccree/ssi_hash.c:1993: warning: excess elements in union initializer
  drivers/staging/ccree/ssi_hash.c:1993: warning: (near initialization for 'driver_hash[0].<anonymous>')
  ...

gcc-4.4.4 has issues with anon union initializers.  Work around this.

Cc: Gilad Ben-Yossef <gilad@benyossef.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 4e5ce33c
......@@ -1987,6 +1987,7 @@ static struct ssi_hash_template driver_hash[] = {
.hmac_driver_name = "hmac-sha1-dx",
.blocksize = SHA1_BLOCK_SIZE,
.synchronize = false,
{
.template_ahash = {
.init = ssi_ahash_init,
.update = ssi_ahash_update,
......@@ -2003,6 +2004,7 @@ static struct ssi_hash_template driver_hash[] = {
.statesize = sizeof(struct sha1_state),
},
},
},
.hash_mode = DRV_HASH_SHA1,
.hw_mode = DRV_HASH_HW_SHA1,
.inter_digestsize = SHA1_DIGEST_SIZE,
......@@ -2014,6 +2016,7 @@ static struct ssi_hash_template driver_hash[] = {
.hmac_driver_name = "hmac-sha256-dx",
.blocksize = SHA256_BLOCK_SIZE,
.synchronize = false,
{
.template_ahash = {
.init = ssi_ahash_init,
.update = ssi_ahash_update,
......@@ -2030,6 +2033,7 @@ static struct ssi_hash_template driver_hash[] = {
.statesize = sizeof(struct sha256_state),
},
},
},
.hash_mode = DRV_HASH_SHA256,
.hw_mode = DRV_HASH_HW_SHA256,
.inter_digestsize = SHA256_DIGEST_SIZE,
......@@ -2041,6 +2045,7 @@ static struct ssi_hash_template driver_hash[] = {
.hmac_driver_name = "hmac-sha224-dx",
.blocksize = SHA224_BLOCK_SIZE,
.synchronize = false,
{
.template_ahash = {
.init = ssi_ahash_init,
.update = ssi_ahash_update,
......@@ -2057,6 +2062,7 @@ static struct ssi_hash_template driver_hash[] = {
.statesize = sizeof(struct sha256_state),
},
},
},
.hash_mode = DRV_HASH_SHA224,
.hw_mode = DRV_HASH_HW_SHA256,
.inter_digestsize = SHA256_DIGEST_SIZE,
......@@ -2069,6 +2075,7 @@ static struct ssi_hash_template driver_hash[] = {
.hmac_driver_name = "hmac-sha384-dx",
.blocksize = SHA384_BLOCK_SIZE,
.synchronize = false,
{
.template_ahash = {
.init = ssi_ahash_init,
.update = ssi_ahash_update,
......@@ -2085,6 +2092,7 @@ static struct ssi_hash_template driver_hash[] = {
.statesize = sizeof(struct sha512_state),
},
},
},
.hash_mode = DRV_HASH_SHA384,
.hw_mode = DRV_HASH_HW_SHA512,
.inter_digestsize = SHA512_DIGEST_SIZE,
......@@ -2096,6 +2104,7 @@ static struct ssi_hash_template driver_hash[] = {
.hmac_driver_name = "hmac-sha512-dx",
.blocksize = SHA512_BLOCK_SIZE,
.synchronize = false,
{
.template_ahash = {
.init = ssi_ahash_init,
.update = ssi_ahash_update,
......@@ -2112,6 +2121,7 @@ static struct ssi_hash_template driver_hash[] = {
.statesize = sizeof(struct sha512_state),
},
},
},
.hash_mode = DRV_HASH_SHA512,
.hw_mode = DRV_HASH_HW_SHA512,
.inter_digestsize = SHA512_DIGEST_SIZE,
......@@ -2124,6 +2134,7 @@ static struct ssi_hash_template driver_hash[] = {
.hmac_driver_name = "hmac-md5-dx",
.blocksize = MD5_HMAC_BLOCK_SIZE,
.synchronize = false,
{
.template_ahash = {
.init = ssi_ahash_init,
.update = ssi_ahash_update,
......@@ -2140,6 +2151,7 @@ static struct ssi_hash_template driver_hash[] = {
.statesize = sizeof(struct md5_state),
},
},
},
.hash_mode = DRV_HASH_MD5,
.hw_mode = DRV_HASH_HW_MD5,
.inter_digestsize = MD5_DIGEST_SIZE,
......@@ -2149,6 +2161,7 @@ static struct ssi_hash_template driver_hash[] = {
.driver_name = "xcbc-aes-dx",
.blocksize = AES_BLOCK_SIZE,
.synchronize = false,
{
.template_ahash = {
.init = ssi_ahash_init,
.update = ssi_mac_update,
......@@ -2165,6 +2178,7 @@ static struct ssi_hash_template driver_hash[] = {
.statesize = sizeof(struct aeshash_state),
},
},
},
.hash_mode = DRV_HASH_NULL,
.hw_mode = DRV_CIPHER_XCBC_MAC,
.inter_digestsize = AES_BLOCK_SIZE,
......@@ -2175,6 +2189,7 @@ static struct ssi_hash_template driver_hash[] = {
.driver_name = "cmac-aes-dx",
.blocksize = AES_BLOCK_SIZE,
.synchronize = false,
{
.template_ahash = {
.init = ssi_ahash_init,
.update = ssi_mac_update,
......@@ -2191,6 +2206,7 @@ static struct ssi_hash_template driver_hash[] = {
.statesize = sizeof(struct aeshash_state),
},
},
},
.hash_mode = DRV_HASH_NULL,
.hw_mode = DRV_CIPHER_CMAC,
.inter_digestsize = AES_BLOCK_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