]> git.baikalelectronics.ru Git - arm-tf.git/commitdiff
fix(st-crypto): move flag control into source code
authorLionel Debieve <lionel.debieve@foss.st.com>
Wed, 3 May 2023 09:40:09 +0000 (11:40 +0200)
committerYann Gautier <yann.gautier@st.com>
Wed, 3 May 2023 11:32:15 +0000 (13:32 +0200)
Remove the control from the include file to avoid compilation
issue. Add the check in the source code instead.

Signed-off-by: Lionel Debieve <lionel.debieve@foss.st.com>
Change-Id: I533f829607f76389399a3e8dbc3c6095278562ab

drivers/st/crypto/stm32_pka.c
include/drivers/st/stm32_pka.h

index 2bbb31dc577c727cfce034dd9cc56d4bde1cd137..5dfad9ab94b32208943888e6531c2ea46c4ac0c7 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2022, STMicroelectronics - All Rights Reserved
+ * Copyright (c) 2022-2023, STMicroelectronics - All Rights Reserved
  *
  * SPDX-License-Identifier: BSD-3-Clause
  */
 
 #include <platform_def.h>
 
+#if !PKA_USE_NIST_P256 && !PKA_USE_BRAINPOOL_P256R1 && !PKA_USE_BRAINPOOL_P256T1 && \
+       !PKA_USE_NIST_P521
+#error "At least one ECDSA curve needs to be selected"
+#endif
+
 /*
  * For our comprehension in this file
  *  _len are in BITs
index ad4690ae5068099dd8c7809caa6d33a00ef2f2ed..34b3f6b5fd7380b7a3ba11461e23a00cd76d305c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2022, STMicroelectronics - All Rights Reserved
+ * Copyright (c) 2022-2023, STMicroelectronics - All Rights Reserved
  *
  * SPDX-License-Identifier: BSD-3-Clause
  */
@@ -9,24 +9,11 @@
 
 #include <stdint.h>
 
-#if !PKA_USE_NIST_P256 && !PKA_USE_BRAINPOOL_P256R1 && !PKA_USE_BRAINPOOL_P256T1 && \
-       !PKA_USE_NIST_P521
-#error "At least one ECDSA curve needs to be selected"
-#endif
-
 enum stm32_pka_ecdsa_curve_id {
-#if PKA_USE_NIST_P256
        PKA_NIST_P256,
-#endif
-#if PKA_USE_BRAINPOOL_P256R1
        PKA_BRAINPOOL_P256R1,
-#endif
-#if PKA_USE_BRAINPOOL_P256T1
        PKA_BRAINPOOL_P256T1,
-#endif
-#if PKA_USE_NIST_P521
        PKA_NIST_P521,
-#endif
 };
 
 struct stm32_pka_platdata {