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 <[email protected]>
---
arch/s390/crypto/sha.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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 {
--
2.4.9
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 <[email protected]>
Applied.
--
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
The define SHA1_DIGEST_LENGTH is not used anywhere, so remove it.
Signed-off-by: LABBE Corentin <[email protected]>
---
include/linux/mpi.h | 6 ------
1 file changed, 6 deletions(-)
diff --git a/include/linux/mpi.h b/include/linux/mpi.h
index 641b7d6..a792b38 100644
--- a/include/linux/mpi.h
+++ b/include/linux/mpi.h
@@ -32,12 +32,6 @@
#include <linux/types.h>
-/* DSI defines */
-
-#define SHA1_DIGEST_LENGTH 20
-
-/*end of DSI defines */
-
#define BYTES_PER_MPI_LIMB (BITS_PER_LONG / 8)
#define BITS_PER_MPI_LIMB BITS_PER_LONG
--
2.4.9
On Thu, Oct 15, 2015 at 08:34:53PM +0200, LABBE Corentin wrote:
> The define SHA1_DIGEST_LENGTH is not used anywhere, so remove it.
>
> Signed-off-by: LABBE Corentin <[email protected]>
Patch applied. Thanks.
--
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt