Linux cryptographic layer development
 help / color / mirror / Atom feed
From: Daniel Borkmann <dborkman@redhat.com>
To: herbert@gondor.apana.org.au
Cc: linux-crypto@vger.kernel.org,
	Cesar Eduardo Barros <cesarb@cesarb.eti.br>
Subject: [PATCH cryptodev] crypto: memneq: fix for archs without efficient unaligned access
Date: Fri,  6 Dec 2013 00:33:33 +0100	[thread overview]
Message-ID: <1386286413-8636-1-git-send-email-dborkman@redhat.com> (raw)

Commit fe8c8a126806 introduced a possible build error for archs
that do not have CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS set. :/
Fix this up by bringing else braces outside of the ifdef.

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Fixes: fe8c8a126806 ("crypto: more robust crypto_memneq")
Cc: Cesar Eduardo Barros <cesarb@cesarb.eti.br>
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
---
 Sending stand-alone fix as original patch is already applied.

 crypto/memneq.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/crypto/memneq.c b/crypto/memneq.c
index 570f6f3..afed1bd 100644
--- a/crypto/memneq.c
+++ b/crypto/memneq.c
@@ -108,8 +108,9 @@ static inline unsigned long __crypto_memneq_16(const void *a, const void *b)
 		OPTIMIZER_HIDE_VAR(neq);
 		neq |= *(unsigned int *)(a+12) ^ *(unsigned int *)(b+12);
 		OPTIMIZER_HIDE_VAR(neq);
-	} else {
+	} else
 #endif /* CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS */
+	{
 		neq |= *(unsigned char *)(a)    ^ *(unsigned char *)(b);
 		OPTIMIZER_HIDE_VAR(neq);
 		neq |= *(unsigned char *)(a+1)  ^ *(unsigned char *)(b+1);
-- 
1.8.3.1

             reply	other threads:[~2013-12-05 23:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-05 23:33 Daniel Borkmann [this message]
2013-12-09 12:10 ` [PATCH cryptodev] crypto: memneq: fix for archs without efficient unaligned access 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=1386286413-8636-1-git-send-email-dborkman@redhat.com \
    --to=dborkman@redhat.com \
    --cc=cesarb@cesarb.eti.br \
    --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