Skip to content

Commit 76bea64

Browse files
Aaron Sierraherbertx
authored andcommitted
crypto: talitos - Remove zero_entry static initializer
Compiling the talitos driver with my GCC 4.3.1 e500v2 cross-compiler resulted in a failed build due to the anonymous union/structures introduced in this commit: crypto: talitos - enhanced talitos_desc struct for SEC1 The build error was: drivers/crypto/talitos.h:56: error: unknown field 'len' specified in initializer drivers/crypto/talitos.h:56: warning: missing braces around initializer drivers/crypto/talitos.h:56: warning: (near initialization for 'zero_entry.<anonymous>') drivers/crypto/talitos.h:57: error: unknown field 'j_extent' specified in initializer drivers/crypto/talitos.h:58: error: unknown field 'eptr' specified in initializer drivers/crypto/talitos.h:58: warning: excess elements in struct initializer drivers/crypto/talitos.h:58: warning: (near initialization for 'zero_entry') make[2]: *** [drivers/crypto/talitos.o] Error 1 make[1]: *** [drivers/crypto] Error 2 make: *** [drivers] Error 2 This patch eliminates the errors by relying on the C standard's implicit assignment of zero to static variables. Signed-off-by: Aaron Sierra <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
1 parent f6e45c2 commit 76bea64

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

drivers/crypto/talitos.h

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,7 @@ struct talitos_ptr {
5252
__be32 ptr; /* address */
5353
};
5454

55-
static const struct talitos_ptr zero_entry = {
56-
.len = 0,
57-
.j_extent = 0,
58-
.eptr = 0,
59-
.ptr = 0
60-
};
55+
static const struct talitos_ptr zero_entry;
6156

6257
/* descriptor */
6358
struct talitos_desc {

0 commit comments

Comments
 (0)