[PATCH 05/18] lib/crypto: sha512: Do not include <crypto/internal/sha2.h>

Eric Biggers ebiggers at kernel.org
Wed Jun 25 17:08:06 AEST 2025


Since the SHA-512 code is now consolidated into a single translation
unit except for assembly code, there is no longer any need for an
internal header.  Indeed, lib/crypto/sha512.c relies on
<crypto/internal/sha2.h> only for indirect inclusions.  Stop including
it.  This prepares for the later removal of this header, once the
SHA-256 code is reorganized similarly and stops needing it too.

Signed-off-by: Eric Biggers <ebiggers at kernel.org>
---
 lib/crypto/sha512.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/crypto/sha512.c b/lib/crypto/sha512.c
index fe9d98b9b7db9..f5a9569a7ef96 100644
--- a/lib/crypto/sha512.c
+++ b/lib/crypto/sha512.c
@@ -7,15 +7,16 @@
  * Copyright (c) 2003 Kyle McMartin <kyle at debian.org>
  * Copyright 2025 Google LLC
  */
 
 #include <crypto/hmac.h>
-#include <crypto/internal/sha2.h>
+#include <crypto/sha2.h>
 #include <linux/export.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/overflow.h>
+#include <linux/unaligned.h>
 #include <linux/wordpart.h>
 
 static const struct sha512_block_state sha384_iv = {
 	.h = {
 		SHA384_H0, SHA384_H1, SHA384_H2, SHA384_H3,
-- 
2.50.0



More information about the Linuxppc-dev mailing list