diff mbox

s390: crypto: replace raw value by their coresponding define

Message ID 1444849860-16334-1-git-send-email-clabbe.montjoie@gmail.com (mailing list archive)
State Accepted
Delegated to: Herbert Xu
Headers show

Commit Message

Corentin Labbe Oct. 14, 2015, 7:11 p.m. UTC
SHA_MAX_STATE_SIZE is just the number of u32 word for SHA512.
So replace the raw value "16" by their meaning (SHA512_DIGEST_SIZE / 4)

Signed-off-by: LABBE Corentin <clabbe.montjoie@gmail.com>
---
 arch/s390/crypto/sha.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Herbert Xu Oct. 15, 2015, 1:19 p.m. UTC | #1
On Wed, Oct 14, 2015 at 09:11:00PM +0200, LABBE Corentin wrote:
> SHA_MAX_STATE_SIZE is just the number of u32 word for SHA512.
> So replace the raw value "16" by their meaning (SHA512_DIGEST_SIZE / 4)
> 
> Signed-off-by: LABBE Corentin <clabbe.montjoie@gmail.com>

Applied.
diff mbox

Patch

diff --git a/arch/s390/crypto/sha.h b/arch/s390/crypto/sha.h
index f4e9dc7..10f2007 100644
--- a/arch/s390/crypto/sha.h
+++ b/arch/s390/crypto/sha.h
@@ -19,7 +19,7 @@ 
 #include <crypto/sha.h>
 
 /* must be big enough for the largest SHA variant */
-#define SHA_MAX_STATE_SIZE	16
+#define SHA_MAX_STATE_SIZE	(SHA512_DIGEST_SIZE / 4)
 #define SHA_MAX_BLOCK_SIZE      SHA512_BLOCK_SIZE
 
 struct s390_sha_ctx {