forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-11 6778948f9de86c3cfaf36725a7c87dcff9ba247f
kernel/arch/arm/crypto/sha256_glue.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Glue code for the SHA256 Secure Hash Algorithm assembly implementation
34 * using optimized ARM assembler and NEON instructions.
....@@ -7,12 +8,6 @@
78 * This file is based on sha256_ssse3_glue.c:
89 * Copyright (C) 2013 Intel Corporation
910 * Author: Tim Chen <tim.c.chen@linux.intel.com>
10
- *
11
- * This program is free software; you can redistribute it and/or modify it
12
- * under the terms of the GNU General Public License as published by the Free
13
- * Software Foundation; either version 2 of the License, or (at your option)
14
- * any later version.
15
- *
1611 */
1712
1813 #include <crypto/internal/hash.h>
....@@ -20,7 +15,6 @@
2015 #include <linux/init.h>
2116 #include <linux/module.h>
2217 #include <linux/mm.h>
23
-#include <linux/cryptohash.h>
2418 #include <linux/types.h>
2519 #include <linux/string.h>
2620 #include <crypto/sha.h>
....@@ -44,7 +38,7 @@
4438 }
4539 EXPORT_SYMBOL(crypto_sha256_arm_update);
4640
47
-static int sha256_final(struct shash_desc *desc, u8 *out)
41
+static int crypto_sha256_arm_final(struct shash_desc *desc, u8 *out)
4842 {
4943 sha256_base_do_finalize(desc,
5044 (sha256_block_fn *)sha256_block_data_order);
....@@ -56,7 +50,7 @@
5650 {
5751 sha256_base_do_update(desc, data, len,
5852 (sha256_block_fn *)sha256_block_data_order);
59
- return sha256_final(desc, out);
53
+ return crypto_sha256_arm_final(desc, out);
6054 }
6155 EXPORT_SYMBOL(crypto_sha256_arm_finup);
6256
....@@ -64,7 +58,7 @@
6458 .digestsize = SHA256_DIGEST_SIZE,
6559 .init = sha256_base_init,
6660 .update = crypto_sha256_arm_update,
67
- .final = sha256_final,
61
+ .final = crypto_sha256_arm_final,
6862 .finup = crypto_sha256_arm_finup,
6963 .descsize = sizeof(struct sha256_state),
7064 .base = {
....@@ -78,7 +72,7 @@
7872 .digestsize = SHA224_DIGEST_SIZE,
7973 .init = sha224_base_init,
8074 .update = crypto_sha256_arm_update,
81
- .final = sha256_final,
75
+ .final = crypto_sha256_arm_final,
8276 .finup = crypto_sha256_arm_finup,
8377 .descsize = sizeof(struct sha256_state),
8478 .base = {