mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH v2 6/7] crypto: sha: reorder struct sha*_state into Linux order
Date: Fri, 26 May 2023 08:37:45 +0200	[thread overview]
Message-ID: <20230526063746.1155297-7-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20230526063746.1155297-1-a.fatoum@pengutronix.de>

Incoming Kernel code expects state to be the first member and uses
variables exported from C to get offsets for the two other members.
To import code as-is from kernel, follow suit. No functional change.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 include/crypto/sha.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/crypto/sha.h b/include/crypto/sha.h
index 17a489bd4a8d..b01d74cd3334 100644
--- a/include/crypto/sha.h
+++ b/include/crypto/sha.h
@@ -67,20 +67,20 @@
 #define SHA512_H7	0x5be0cd19137e2179ULL
 
 struct sha1_state {
-	u64 count;
 	u32 state[SHA1_DIGEST_SIZE / 4];
+	u64 count;
 	u8 buffer[SHA1_BLOCK_SIZE];
 };
 
 struct sha256_state {
-	u64 count;
 	u32 state[SHA256_DIGEST_SIZE / 4];
+	u64 count;
 	u8 buf[SHA256_BLOCK_SIZE];
 };
 
 struct sha512_state {
-	u64 count[2];
 	u64 state[SHA512_DIGEST_SIZE / 8];
+	u64 count[2];
 	u8 buf[SHA512_BLOCK_SIZE];
 };
 
-- 
2.39.2




  parent reply	other threads:[~2023-05-26  6:39 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-26  6:37 [PATCH v2 0/7] ARM64: crypto: add Crypto Extensions accelerated SHA implementation Ahmad Fatoum
2023-05-26  6:37 ` [PATCH v2 1/7] crypto: digest: match driver name if no algo name matches Ahmad Fatoum
2023-05-26  6:37 ` [PATCH v2 2/7] test: self: add digest test Ahmad Fatoum
2023-05-26  6:37 ` [PATCH v2 3/7] include: sync <linux/linkage.h> with Linux Ahmad Fatoum
2023-05-26  6:54   ` Sascha Hauer
2023-05-26  7:45     ` Ahmad Fatoum
2023-05-26  6:37 ` [PATCH v2 4/7] ARM: asm: implement CPU_BE/CPU_LE Ahmad Fatoum
2023-05-26  6:37 ` [PATCH v2 5/7] ARM: asm: import Linux adr_l/ldr_l assembler.h definitions Ahmad Fatoum
2023-05-26  6:37 ` Ahmad Fatoum [this message]
2023-05-26  6:37 ` [PATCH v2 7/7] ARM64: crypto: add Crypto Extensions accelerated SHA implementation Ahmad Fatoum

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=20230526063746.1155297-7-a.fatoum@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.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