From c1b6fdc5af8b620493c331a01dbbf9e81f1b0ea0 Mon Sep 17 00:00:00 2001 From: Ron Eldor Date: Fri, 31 Aug 2018 13:53:29 +0300 Subject: [PATCH] Rename parameter name Rename `obsolete_ctx` to `unused_ctx` as it is simply unused. --- features/mbedtls/platform/inc/platform_alt.h | 4 ++-- features/mbedtls/platform/src/platform_alt.c | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/features/mbedtls/platform/inc/platform_alt.h b/features/mbedtls/platform/inc/platform_alt.h index 7246c3bb77..687be6d642 100644 --- a/features/mbedtls/platform/inc/platform_alt.h +++ b/features/mbedtls/platform/inc/platform_alt.h @@ -49,7 +49,7 @@ mbedtls_platform_context; * implementation is platform-specific, and its implementation MUST be provided. * */ -int crypto_platform_setup( crypto_platform_ctx *ctx ); +int crypto_platform_setup( crypto_platform_ctx *unused_ctx ); /** * \brief This function performs any platform teardown operations, to disable cryptographic operations. @@ -60,7 +60,7 @@ int crypto_platform_setup( crypto_platform_ctx *ctx ); * Its implementation is platform-specific,and its implementation MUST be provided. * */ -void crypto_platform_terminate( crypto_platform_ctx *ctx ); +void crypto_platform_terminate( crypto_platform_ctx *unused_ctx ); #endif #endif /* __PLATFORM_ALT__ */ diff --git a/features/mbedtls/platform/src/platform_alt.c b/features/mbedtls/platform/src/platform_alt.c index c76c593036..285261032c 100644 --- a/features/mbedtls/platform/src/platform_alt.c +++ b/features/mbedtls/platform/src/platform_alt.c @@ -24,7 +24,7 @@ mbedtls_platform_context ctx = { }; -int mbedtls_platform_setup( mbedtls_platform_context *obsolete_ctx ) +int mbedtls_platform_setup( mbedtls_platform_context *unused_ctx ) { int ret = 0; @@ -38,9 +38,8 @@ int mbedtls_platform_setup( mbedtls_platform_context *obsolete_ctx ) return ( ret ); } -void mbedtls_platform_teardown( mbedtls_platform_context *obsolete_ctx ) +void mbedtls_platform_teardown( mbedtls_platform_context *unused_ctx ) { - core_util_atomic_decr_u32( ( volatile uint32_t * )&ctx.reference_count, 1 ); if( ctx.reference_count < 1 ) {