Message ID | 985540634.83104.1438363661992.JavaMail.zimbra@xes-inc.com (mailing list archive) |
---|---|
State | Changes Requested |
Delegated to: | Herbert Xu |
Headers | show |
On Fri, Jul 31, 2015 at 12:27:41PM -0500, Aaron Sierra wrote: > > -static const struct talitos_ptr zero_entry = { > - .len = 0, > - .j_extent = 0, > - .eptr = 0, > - .ptr = 0 > -}; > +static const struct talitos_ptr zero_entry = {{{ 0 }}}; Please get rid of the initialiser completely. Thanks,
diff --git a/drivers/crypto/talitos.h b/drivers/crypto/talitos.h index 314daf5..bf88fe7 100644 --- a/drivers/crypto/talitos.h +++ b/drivers/crypto/talitos.h @@ -52,12 +52,7 @@ struct talitos_ptr { __be32 ptr; /* address */ }; -static const struct talitos_ptr zero_entry = { - .len = 0, - .j_extent = 0, - .eptr = 0, - .ptr = 0 -}; +static const struct talitos_ptr zero_entry = {{{ 0 }}}; /* descriptor */ struct talitos_desc {
Compiling this 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 works around the errors by changing the static constant zero_entry's initializer to use an initialization shorthand. Signed-off-by: Aaron Sierra <asierra@xes-inc.com> --- drivers/crypto/talitos.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)