Simplify handling of psa_hash_suspend/resume

The PSA Crypto API functions psa_hash_suspend and psa_hash_resume
never need to be supported by a service provider so the client-side
handling can be simplified. This change removes the mapping from
the client functions to the backend crypto call, allowing the
crypto caller support for the functions to be removed.

Signed-off-by: Julian Hall <julian.hall@arm.com>
Change-Id: Ib26e36e1e4065ebb685fb9cbf7f9c3a727784259
diff --git a/components/service/crypto/client/caller/packed-c/crypto_caller_hash.h b/components/service/crypto/client/caller/packed-c/crypto_caller_hash.h
index 3dfa6de..3682007 100644
--- a/components/service/crypto/client/caller/packed-c/crypto_caller_hash.h
+++ b/components/service/crypto/client/caller/packed-c/crypto_caller_hash.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2021, Arm Limited and Contributors. All rights reserved.
+ * Copyright (c) 2021-2022, Arm Limited and Contributors. All rights reserved.
  *
  * SPDX-License-Identifier: BSD-3-Clause
  */
@@ -323,23 +323,6 @@
 	return psa_status;
 }
 
-static inline psa_status_t crypto_caller_hash_suspend(struct service_client *context,
-	uint32_t op_handle,
-	uint8_t *hash_state,
-	size_t hash_state_size,
-	size_t *hash_state_length)
-{
-	return PSA_ERROR_NOT_SUPPORTED;
-}
-
-static inline psa_status_t crypto_caller_hash_resume(struct service_client *context,
-	uint32_t op_handle,
-	const uint8_t *hash_state,
-	size_t hash_state_length)
-{
-	return PSA_ERROR_NOT_SUPPORTED;
-}
-
 static inline size_t crypto_caller_hash_max_update_size(const struct service_client *context)
 {
 	/* Returns the maximum number of bytes that may be
diff --git a/components/service/crypto/client/caller/stub/crypto_caller_hash.h b/components/service/crypto/client/caller/stub/crypto_caller_hash.h
index 2faee02..6666ad3 100644
--- a/components/service/crypto/client/caller/stub/crypto_caller_hash.h
+++ b/components/service/crypto/client/caller/stub/crypto_caller_hash.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2021, Arm Limited and Contributors. All rights reserved.
+ * Copyright (c) 2021-2022, Arm Limited and Contributors. All rights reserved.
  *
  * SPDX-License-Identifier: BSD-3-Clause
  */
@@ -18,6 +18,10 @@
 	uint32_t *op_handle,
 	psa_algorithm_t alg)
 {
+	(void)context;
+	(void)op_handle;
+	(void)alg;
+
 	return PSA_ERROR_NOT_SUPPORTED;
 }
 
@@ -26,6 +30,11 @@
 	const uint8_t *input,
 	size_t input_length)
 {
+	(void)context;
+	(void)op_handle;
+	(void)input;
+	(void)input_length;
+
 	return PSA_ERROR_NOT_SUPPORTED;
 }
 
@@ -35,12 +44,21 @@
 	size_t hash_size,
 	size_t *hash_length)
 {
+	(void)context;
+	(void)op_handle;
+	(void)hash;
+	(void)hash_size;
+	(void)hash_length;
+
 	return PSA_ERROR_NOT_SUPPORTED;
 }
 
 static inline psa_status_t crypto_caller_hash_abort(struct service_client *context,
 	uint32_t op_handle)
 {
+	(void)context;
+	(void)op_handle;
+
 	return PSA_ERROR_NOT_SUPPORTED;
 }
 
@@ -49,6 +67,11 @@
 	const uint8_t *hash,
 	size_t hash_length)
 {
+	(void)context;
+	(void)op_handle;
+	(void)hash;
+	(void)hash_length;
+
 	return PSA_ERROR_NOT_SUPPORTED;
 }
 
@@ -56,28 +79,17 @@
 	uint32_t source_op_handle,
 	uint32_t *target_op_handle)
 {
-	return PSA_ERROR_NOT_SUPPORTED;
-}
+	(void)context;
+	(void)source_op_handle;
+	(void)target_op_handle;
 
-static inline psa_status_t crypto_caller_hash_suspend(struct service_client *context,
-	uint32_t op_handle,
-	uint8_t *hash_state,
-	size_t hash_state_size,
-	size_t *hash_state_length)
-{
-	return PSA_ERROR_NOT_SUPPORTED;
-}
-
-static inline psa_status_t crypto_caller_hash_resume(struct service_client *context,
-	uint32_t op_handle,
-	const uint8_t *hash_state,
-	size_t hash_state_length)
-{
 	return PSA_ERROR_NOT_SUPPORTED;
 }
 
 static inline size_t crypto_caller_hash_max_update_size(struct service_client *context)
 {
+	(void)context;
+
 	return 0;
 }
 
diff --git a/components/service/crypto/client/psa/psa_hash.c b/components/service/crypto/client/psa/psa_hash.c
index e5dd003..2e3db0e 100644
--- a/components/service/crypto/client/psa/psa_hash.c
+++ b/components/service/crypto/client/psa/psa_hash.c
@@ -71,6 +71,11 @@
 	size_t hash_state_size,
 	size_t *hash_state_length)
 {
+	(void)operation;
+	(void)hash_state;
+	(void)hash_state_size;
+	(void)hash_state_length;
+
 	return PSA_ERROR_NOT_SUPPORTED;
 }
 
@@ -78,6 +83,10 @@
 	const uint8_t *hash_state,
 	size_t hash_state_length)
 {
+	(void)operation;
+	(void)hash_state;
+	(void)hash_state_length;
+
 	return PSA_ERROR_NOT_SUPPORTED;
 }