linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Aaron Sierra <asierra@xes-inc.com>
To: Herbert Xu <herbert@gondor.apana.org.au>,
	"David S. Miller" <davem@davemloft.net>
Cc: linux-crypto@vger.kernel.org, Christophe Leroy <christophe.leroy@c-s.fr>
Subject: [PATCH] crypto: talitos: Init zero_entry more compatibly
Date: Fri, 31 Jul 2015 12:27:41 -0500 (CDT)	[thread overview]
Message-ID: <985540634.83104.1438363661992.JavaMail.zimbra@xes-inc.com> (raw)
In-Reply-To: <767312390.183043.1438296525267.JavaMail.zimbra@xes-inc.com>

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(-)

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 {
-- 
1.9.1

       reply	other threads:[~2015-07-31 18:17 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <767312390.183043.1438296525267.JavaMail.zimbra@xes-inc.com>
2015-07-31 17:27 ` Aaron Sierra [this message]
2015-07-31 20:52   ` [PATCH] crypto: talitos: Prevent panic in probe error path Aaron Sierra
2015-08-04  7:18     ` Herbert Xu
2015-08-04 14:43       ` Aaron Sierra
2015-08-05  0:08         ` Herbert Xu
2015-08-05 14:24           ` Aaron Sierra
2015-08-05 21:52     ` [PATCH v2] " Aaron Sierra
2015-08-06 18:45       ` Aaron Sierra
2015-08-10 15:41         ` Herbert Xu
2015-08-02  1:22   ` [PATCH] crypto: talitos: Init zero_entry more compatibly Herbert Xu
2015-08-03 16:14   ` [PATCH v2] crypto: talitos: Remove zero_entry static initializer Aaron Sierra
2015-08-03 23:31     ` Herbert Xu
2015-08-03 23:47       ` Aaron Sierra
2015-08-03 23:56     ` [PATCH v3] " Aaron Sierra
2015-08-04  9:45       ` Herbert Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=985540634.83104.1438363661992.JavaMail.zimbra@xes-inc.com \
    --to=asierra@xes-inc.com \
    --cc=christophe.leroy@c-s.fr \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).