From 235949b1f436cb6e62c726d2f3db60b1045c0a43 Mon Sep 17 00:00:00 2001 From: Kostiantyn Tkachov Date: Mon, 2 Sep 2019 22:17:25 +0300 Subject: [PATCH] Changed order of config file checking in include defines --- .../TARGET_Cypress/TARGET_PSOC6/TARGET_PSOC6_01/sha1_alt.h | 6 +++--- .../TARGET_PSOC6/TARGET_PSOC6_01/sha256_alt.h | 6 +++--- .../TARGET_PSOC6/TARGET_PSOC6_01/sha512_alt.h | 6 +++--- .../TARGET_Cypress/TARGET_PSOC6/TARGET_PSOC6_02/sha1_alt.h | 6 +++--- .../TARGET_PSOC6/TARGET_PSOC6_02/sha256_alt.h | 6 +++--- .../TARGET_PSOC6/TARGET_PSOC6_02/sha512_alt.h | 6 +++--- .../mbedtls/targets/TARGET_Cypress/TARGET_PSOC6/aes_alt.c | 1 - .../targets/TARGET_Cypress/TARGET_PSOC6/crypto_common.h | 6 +++--- .../mbedtls/targets/TARGET_Cypress/TARGET_PSOC6/ecdsa_alt.c | 6 +++--- .../mbedtls/targets/TARGET_Cypress/TARGET_PSOC6/ecp_alt.c | 6 +++--- .../targets/TARGET_Cypress/TARGET_PSOC6/ecp_curves_alt.c | 6 +++--- .../mbedtls/targets/TARGET_Cypress/TARGET_PSOC6/sha1_alt.c | 6 +++--- .../targets/TARGET_Cypress/TARGET_PSOC6/sha256_alt.c | 6 +++--- .../targets/TARGET_Cypress/TARGET_PSOC6/sha512_alt.c | 6 +++--- 14 files changed, 39 insertions(+), 40 deletions(-) diff --git a/features/mbedtls/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_PSOC6_01/sha1_alt.h b/features/mbedtls/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_PSOC6_01/sha1_alt.h index d90e68ed5d..cd86f93fb2 100644 --- a/features/mbedtls/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_PSOC6_01/sha1_alt.h +++ b/features/mbedtls/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_PSOC6_01/sha1_alt.h @@ -28,10 +28,10 @@ #if !defined(SHA1_ALT_H) #define SHA1_ALT_H -#if !defined(MBEDTLS_CONFIG_FILE) -#include "config.h" -#else +#if defined(MBEDTLS_CONFIG_FILE) #include MBEDTLS_CONFIG_FILE +#else +#include "config.h" #endif #include "crypto_common.h" diff --git a/features/mbedtls/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_PSOC6_01/sha256_alt.h b/features/mbedtls/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_PSOC6_01/sha256_alt.h index 57a5aaa3e5..431ebae15c 100644 --- a/features/mbedtls/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_PSOC6_01/sha256_alt.h +++ b/features/mbedtls/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_PSOC6_01/sha256_alt.h @@ -29,10 +29,10 @@ #if !defined(SHA256_ALT_H) #define SHA256_ALT_H -#if !defined(MBEDTLS_CONFIG_FILE) -#include "config.h" -#else +#if defined(MBEDTLS_CONFIG_FILE) #include MBEDTLS_CONFIG_FILE +#else +#include "config.h" #endif #include "crypto_common.h" diff --git a/features/mbedtls/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_PSOC6_01/sha512_alt.h b/features/mbedtls/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_PSOC6_01/sha512_alt.h index 0f98be83f2..bfe9a1cb99 100644 --- a/features/mbedtls/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_PSOC6_01/sha512_alt.h +++ b/features/mbedtls/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_PSOC6_01/sha512_alt.h @@ -28,10 +28,10 @@ #if !defined(SHA512_ALT_H) #define SHA512_ALT_H -#if !defined(MBEDTLS_CONFIG_FILE) -#include "config.h" -#else +#if defined(MBEDTLS_CONFIG_FILE) #include MBEDTLS_CONFIG_FILE +#else +#include "config.h" #endif #include "crypto_common.h" diff --git a/features/mbedtls/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_PSOC6_02/sha1_alt.h b/features/mbedtls/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_PSOC6_02/sha1_alt.h index 974654d761..d19f099bf8 100644 --- a/features/mbedtls/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_PSOC6_02/sha1_alt.h +++ b/features/mbedtls/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_PSOC6_02/sha1_alt.h @@ -28,10 +28,10 @@ #if !defined(SHA1_ALT_H) #define SHA1_ALT_H -#if !defined(MBEDTLS_CONFIG_FILE) -#include "config.h" -#else +#if defined(MBEDTLS_CONFIG_FILE) #include MBEDTLS_CONFIG_FILE +#else +#include "config.h" #endif #include "crypto_common.h" diff --git a/features/mbedtls/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_PSOC6_02/sha256_alt.h b/features/mbedtls/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_PSOC6_02/sha256_alt.h index 9d25852916..9198160587 100644 --- a/features/mbedtls/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_PSOC6_02/sha256_alt.h +++ b/features/mbedtls/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_PSOC6_02/sha256_alt.h @@ -29,10 +29,10 @@ #if !defined(SHA256_ALT_H) #define SHA256_ALT_H -#if !defined(MBEDTLS_CONFIG_FILE) -#include "config.h" -#else +#if defined(MBEDTLS_CONFIG_FILE) #include MBEDTLS_CONFIG_FILE +#else +#include "config.h" #endif #include "crypto_common.h" diff --git a/features/mbedtls/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_PSOC6_02/sha512_alt.h b/features/mbedtls/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_PSOC6_02/sha512_alt.h index f1e0fba5ac..7eb6696fe8 100644 --- a/features/mbedtls/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_PSOC6_02/sha512_alt.h +++ b/features/mbedtls/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_PSOC6_02/sha512_alt.h @@ -28,10 +28,10 @@ #if !defined(SHA512_ALT_H) #define SHA512_ALT_H -#if !defined(MBEDTLS_CONFIG_FILE) -#include "config.h" -#else +#if defined(MBEDTLS_CONFIG_FILE) #include MBEDTLS_CONFIG_FILE +#else +#include "config.h" #endif #include "crypto_common.h" diff --git a/features/mbedtls/targets/TARGET_Cypress/TARGET_PSOC6/aes_alt.c b/features/mbedtls/targets/TARGET_Cypress/TARGET_PSOC6/aes_alt.c index 745861b122..d234d22aa0 100644 --- a/features/mbedtls/targets/TARGET_Cypress/TARGET_PSOC6/aes_alt.c +++ b/features/mbedtls/targets/TARGET_Cypress/TARGET_PSOC6/aes_alt.c @@ -122,7 +122,6 @@ static int aes_set_keys( mbedtls_aes_context *ctx, const unsigned char *key, if (CY_CRYPTO_SUCCESS != status) { ret = MBEDTLS_ERR_AES_HW_ACCEL_FAILED; - goto exit; } exit: diff --git a/features/mbedtls/targets/TARGET_Cypress/TARGET_PSOC6/crypto_common.h b/features/mbedtls/targets/TARGET_Cypress/TARGET_PSOC6/crypto_common.h index 99d0156e0b..d11ada79eb 100644 --- a/features/mbedtls/targets/TARGET_Cypress/TARGET_PSOC6/crypto_common.h +++ b/features/mbedtls/targets/TARGET_Cypress/TARGET_PSOC6/crypto_common.h @@ -27,10 +27,10 @@ #if !defined(CRYPTO_COMMON_H) #define CRYPTO_COMMON_H -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else +#if defined(MBEDTLS_CONFIG_FILE) #include MBEDTLS_CONFIG_FILE +#else +#include "config.h" #endif #include "mbedtls/ecp.h" diff --git a/features/mbedtls/targets/TARGET_Cypress/TARGET_PSOC6/ecdsa_alt.c b/features/mbedtls/targets/TARGET_Cypress/TARGET_PSOC6/ecdsa_alt.c index b0c6e5974f..e6ffee0082 100644 --- a/features/mbedtls/targets/TARGET_Cypress/TARGET_PSOC6/ecdsa_alt.c +++ b/features/mbedtls/targets/TARGET_Cypress/TARGET_PSOC6/ecdsa_alt.c @@ -25,10 +25,10 @@ * */ -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else +#if defined(MBEDTLS_CONFIG_FILE) #include MBEDTLS_CONFIG_FILE +#else +#include "config.h" #endif #if defined(MBEDTLS_ECDSA_C) diff --git a/features/mbedtls/targets/TARGET_Cypress/TARGET_PSOC6/ecp_alt.c b/features/mbedtls/targets/TARGET_Cypress/TARGET_PSOC6/ecp_alt.c index bb826f2ee0..811363adb7 100644 --- a/features/mbedtls/targets/TARGET_Cypress/TARGET_PSOC6/ecp_alt.c +++ b/features/mbedtls/targets/TARGET_Cypress/TARGET_PSOC6/ecp_alt.c @@ -43,10 +43,10 @@ * */ -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else +#if defined(MBEDTLS_CONFIG_FILE) #include MBEDTLS_CONFIG_FILE +#else +#include "config.h" #endif #if defined(MBEDTLS_ECP_C) diff --git a/features/mbedtls/targets/TARGET_Cypress/TARGET_PSOC6/ecp_curves_alt.c b/features/mbedtls/targets/TARGET_Cypress/TARGET_PSOC6/ecp_curves_alt.c index 62150ef0e5..a855ca5587 100644 --- a/features/mbedtls/targets/TARGET_Cypress/TARGET_PSOC6/ecp_curves_alt.c +++ b/features/mbedtls/targets/TARGET_Cypress/TARGET_PSOC6/ecp_curves_alt.c @@ -25,10 +25,10 @@ * */ -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else +#if defined(MBEDTLS_CONFIG_FILE) #include MBEDTLS_CONFIG_FILE +#else +#include "config.h" #endif #if defined(MBEDTLS_ECP_C) diff --git a/features/mbedtls/targets/TARGET_Cypress/TARGET_PSOC6/sha1_alt.c b/features/mbedtls/targets/TARGET_Cypress/TARGET_PSOC6/sha1_alt.c index a8d0254310..7fb5b7404b 100644 --- a/features/mbedtls/targets/TARGET_Cypress/TARGET_PSOC6/sha1_alt.c +++ b/features/mbedtls/targets/TARGET_Cypress/TARGET_PSOC6/sha1_alt.c @@ -26,10 +26,10 @@ */ -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else +#if defined(MBEDTLS_CONFIG_FILE) #include MBEDTLS_CONFIG_FILE +#else +#include "config.h" #endif #if defined(MBEDTLS_SHA1_C) diff --git a/features/mbedtls/targets/TARGET_Cypress/TARGET_PSOC6/sha256_alt.c b/features/mbedtls/targets/TARGET_Cypress/TARGET_PSOC6/sha256_alt.c index efb8552653..f3c27ecd7a 100644 --- a/features/mbedtls/targets/TARGET_Cypress/TARGET_PSOC6/sha256_alt.c +++ b/features/mbedtls/targets/TARGET_Cypress/TARGET_PSOC6/sha256_alt.c @@ -25,10 +25,10 @@ * */ -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else +#if defined(MBEDTLS_CONFIG_FILE) #include MBEDTLS_CONFIG_FILE +#else +#include "config.h" #endif #if defined(MBEDTLS_SHA256_C) diff --git a/features/mbedtls/targets/TARGET_Cypress/TARGET_PSOC6/sha512_alt.c b/features/mbedtls/targets/TARGET_Cypress/TARGET_PSOC6/sha512_alt.c index 5d9cf48a3c..74de3b9c8b 100644 --- a/features/mbedtls/targets/TARGET_Cypress/TARGET_PSOC6/sha512_alt.c +++ b/features/mbedtls/targets/TARGET_Cypress/TARGET_PSOC6/sha512_alt.c @@ -25,10 +25,10 @@ * */ -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else +#if defined(MBEDTLS_CONFIG_FILE) #include MBEDTLS_CONFIG_FILE +#else +#include "config.h" #endif #if defined(MBEDTLS_SHA512_C)