public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] lib/mpi: clean unused SHA1_DIGEST_LENGTH
@ 2015-10-14 19:12 LABBE Corentin
  2015-10-15 13:19 ` Herbert Xu
  0 siblings, 1 reply; 5+ messages in thread
From: LABBE Corentin @ 2015-10-14 19:12 UTC (permalink / raw)
  To: clabbe.montjoie, herbert, tadeusz.struk; +Cc: linux-kernel

The define SHA1_DIGEST_LENGTH is not used anywhere, so remove it.

Signed-off-by: LABBE Corentin <clabbe.montjoie@gmail.com>
---
 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


^ permalink raw reply related	[flat|nested] 5+ messages in thread
* [PATCH] s390: crypto: replace raw value by their coresponding define
@ 2015-10-14 19:11 LABBE Corentin
  2015-10-15 18:34 ` [PATCH] lib/mpi: clean unused SHA1_DIGEST_LENGTH LABBE Corentin
  0 siblings, 1 reply; 5+ messages in thread
From: LABBE Corentin @ 2015-10-14 19:11 UTC (permalink / raw)
  To: davem, heiko.carstens, herbert, schwidefsky
  Cc: LABBE Corentin, linux-crypto, linux-kernel, linux-s390

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

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


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-10-20 15:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-14 19:12 [PATCH] lib/mpi: clean unused SHA1_DIGEST_LENGTH LABBE Corentin
2015-10-15 13:19 ` Herbert Xu
2015-10-20 15:03   ` LABBE Corentin
  -- strict thread matches above, loose matches on Subject: below --
2015-10-14 19:11 [PATCH] s390: crypto: replace raw value by their coresponding define LABBE Corentin
2015-10-15 18:34 ` [PATCH] lib/mpi: clean unused SHA1_DIGEST_LENGTH LABBE Corentin
2015-10-20 14:19   ` Herbert Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox