coding guideline followed
diff --git a/api-tests/dev_apis/crypto/test_c021/test_c021.c b/api-tests/dev_apis/crypto/test_c021/test_c021.c
index 5f6c5d6..540f9fd 100644
--- a/api-tests/dev_apis/crypto/test_c021/test_c021.c
+++ b/api-tests/dev_apis/crypto/test_c021/test_c021.c
@@ -59,7 +59,7 @@
{
val->print(PRINT_TEST, "[Check %d] ", g_test_count++);
val->print(PRINT_TEST, check1[i].test_desc, 0);
- memset(&operation,0,sizeof(psa_key_derivation_operation_t));
+ //memset(&operation,0,sizeof(psa_key_derivation_operation_t));
//attributes = PSA_KEY_ATTRIBUTES_INIT;
//derv_attributes = PSA_KEY_ATTRIBUTES_INIT;
diff --git a/api-tests/dev_apis/crypto/test_c026/test_c026.c b/api-tests/dev_apis/crypto/test_c026/test_c026.c
index c599951..4cec1f4 100644
--- a/api-tests/dev_apis/crypto/test_c026/test_c026.c
+++ b/api-tests/dev_apis/crypto/test_c026/test_c026.c
@@ -35,7 +35,7 @@
int num_checks = sizeof(check1)/sizeof(check1[0]);
int32_t i, status;
psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT;
- psa_mac_operation_t operation=PSA_MAC_OPERATION_INIT;
+ psa_mac_operation_t operation = PSA_MAC_OPERATION_INIT;
psa_key_id_t key;
if (num_checks == 0)
@@ -125,7 +125,7 @@
{
int32_t status;
psa_key_id_t key = 11;
- psa_mac_operation_t operation=PSA_MAC_OPERATION_INIT;
+ psa_mac_operation_t operation = PSA_MAC_OPERATION_INIT;
if (valid_test_input_index < 0)
return RESULT_SKIP(VAL_STATUS_NO_TESTS);
diff --git a/api-tests/dev_apis/crypto/test_c027/test_c027.c b/api-tests/dev_apis/crypto/test_c027/test_c027.c
index f92ca14..4b5daa8 100644
--- a/api-tests/dev_apis/crypto/test_c027/test_c027.c
+++ b/api-tests/dev_apis/crypto/test_c027/test_c027.c
@@ -32,8 +32,8 @@
{
int32_t num_checks = sizeof(check1)/sizeof(check1[0]);
int32_t i, status;
- psa_mac_operation_t operation=PSA_MAC_OPERATION_INIT;
- psa_key_attributes_t attributes=PSA_KEY_ATTRIBUTES_INIT;
+ psa_mac_operation_t operation = PSA_MAC_OPERATION_INIT;
+ psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT;
psa_key_id_t key;
if (num_checks == 0)
diff --git a/api-tests/dev_apis/crypto/test_c028/test_c028.c b/api-tests/dev_apis/crypto/test_c028/test_c028.c
index 3aa058b..baaec2a 100644
--- a/api-tests/dev_apis/crypto/test_c028/test_c028.c
+++ b/api-tests/dev_apis/crypto/test_c028/test_c028.c
@@ -35,7 +35,7 @@
int32_t num_checks = sizeof(check1)/sizeof(check1[0]);
int32_t i, status;
size_t mac_length;
- psa_mac_operation_t operation=PSA_MAC_OPERATION_INIT;
+ psa_mac_operation_t operation = PSA_MAC_OPERATION_INIT;
psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT;
psa_key_id_t key;
diff --git a/api-tests/dev_apis/crypto/test_c029/test_c029.c b/api-tests/dev_apis/crypto/test_c029/test_c029.c
index c1141bf..55f20a4 100644
--- a/api-tests/dev_apis/crypto/test_c029/test_c029.c
+++ b/api-tests/dev_apis/crypto/test_c029/test_c029.c
@@ -35,7 +35,7 @@
int num_checks = sizeof(check1)/sizeof(check1[0]);
int32_t i, status;
psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT;
- psa_mac_operation_t operation=PSA_MAC_OPERATION_INIT;
+ psa_mac_operation_t operation = PSA_MAC_OPERATION_INIT;
psa_key_id_t key;
if (num_checks == 0)
diff --git a/api-tests/dev_apis/crypto/test_c030/test_c030.c b/api-tests/dev_apis/crypto/test_c030/test_c030.c
index 8cbecc1..322bed4 100644
--- a/api-tests/dev_apis/crypto/test_c030/test_c030.c
+++ b/api-tests/dev_apis/crypto/test_c030/test_c030.c
@@ -32,8 +32,8 @@
{
int32_t num_checks = sizeof(check1)/sizeof(check1[0]);
int32_t i, status;
- psa_mac_operation_t operation=PSA_MAC_OPERATION_INIT;
- psa_key_attributes_t attributes=PSA_KEY_ATTRIBUTES_INIT;
+ psa_mac_operation_t operation = PSA_MAC_OPERATION_INIT;
+ psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT;
psa_key_id_t key;
if (num_checks == 0)
diff --git a/api-tests/dev_apis/crypto/test_c031/test_c031.c b/api-tests/dev_apis/crypto/test_c031/test_c031.c
index 3701bfc..089695c 100644
--- a/api-tests/dev_apis/crypto/test_c031/test_c031.c
+++ b/api-tests/dev_apis/crypto/test_c031/test_c031.c
@@ -35,9 +35,9 @@
{
int32_t num_checks = sizeof(check1)/sizeof(check1[0]);
int32_t i, status;
- psa_mac_operation_t operation=PSA_MAC_OPERATION_INIT;
- psa_key_attributes_t attributes=PSA_KEY_ATTRIBUTES_INIT;
- psa_key_id_t key=0;
+ psa_mac_operation_t operation = PSA_MAC_OPERATION_INIT;
+ psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT;
+ psa_key_id_t key = 0;
if (num_checks == 0)
{
@@ -115,7 +115,7 @@
{
size_t mac_length;
psa_key_id_t key;
- psa_mac_operation_t operation=PSA_MAC_OPERATION_INIT;
+ psa_mac_operation_t operation = PSA_MAC_OPERATION_INIT;
int32_t status;
psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT;
diff --git a/api-tests/dev_apis/crypto/test_c053/test_c053.c b/api-tests/dev_apis/crypto/test_c053/test_c053.c
index 55ccbe3..ca546f0 100644
--- a/api-tests/dev_apis/crypto/test_c053/test_c053.c
+++ b/api-tests/dev_apis/crypto/test_c053/test_c053.c
@@ -32,8 +32,8 @@
{
int32_t i, status;
int32_t num_checks = sizeof(check1)/sizeof(check1[0]);
- psa_key_attributes_t attributes=PSA_KEY_ATTRIBUTES_INIT;
- psa_aead_operation_t operation;
+ psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT;
+ psa_aead_operation_t operation = PSA_AEAD_OPERATION_INIT;
psa_key_id_t key;
if (num_checks == 0)
diff --git a/api-tests/platform/targets/tgt_dev_apis_linux/nspe/main.c b/api-tests/platform/targets/tgt_dev_apis_linux/nspe/main.c
index a503b6e..747739d 100755
--- a/api-tests/platform/targets/tgt_dev_apis_linux/nspe/main.c
+++ b/api-tests/platform/targets/tgt_dev_apis_linux/nspe/main.c
@@ -1,5 +1,5 @@
/** @file
- * Copyright (c) 2019-2020, Arm Limited or its affiliates. All rights reserved.
+ * Copyright (c) 2021, Arm Limited or its affiliates. All rights reserved.
* SPDX-License-Identifier : Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/api-tests/platform/targets/tgt_dev_apis_linux/nspe/pal_crypto_config.h b/api-tests/platform/targets/tgt_dev_apis_linux/nspe/pal_crypto_config.h
index f849287..844cd2e 100755
--- a/api-tests/platform/targets/tgt_dev_apis_linux/nspe/pal_crypto_config.h
+++ b/api-tests/platform/targets/tgt_dev_apis_linux/nspe/pal_crypto_config.h
@@ -1,5 +1,5 @@
/** @file
- * Copyright (c) 2019-2021, Arm Limited or its affiliates. All rights reserved.
+ * Copyright (c) 2021, Arm Limited or its affiliates. All rights reserved.
* SPDX-License-Identifier : Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/api-tests/platform/targets/tgt_dev_apis_linux/nspe/pal_driver_intf.c b/api-tests/platform/targets/tgt_dev_apis_linux/nspe/pal_driver_intf.c
index e91e160..1dcfeaa 100755
--- a/api-tests/platform/targets/tgt_dev_apis_linux/nspe/pal_driver_intf.c
+++ b/api-tests/platform/targets/tgt_dev_apis_linux/nspe/pal_driver_intf.c
@@ -1,5 +1,5 @@
/** @file
- * Copyright (c) 2019-2020, Arm Limited or its affiliates. All rights reserved.
+ * Copyright (c) 2021, Arm Limited or its affiliates. All rights reserved.
* SPDX-License-Identifier : Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/api-tests/platform/targets/tgt_dev_apis_linux/nspe/pal_storage_config.h b/api-tests/platform/targets/tgt_dev_apis_linux/nspe/pal_storage_config.h
index bbb3741..930f67c 100755
--- a/api-tests/platform/targets/tgt_dev_apis_linux/nspe/pal_storage_config.h
+++ b/api-tests/platform/targets/tgt_dev_apis_linux/nspe/pal_storage_config.h
@@ -1,5 +1,5 @@
/** @file
- * Copyright (c) 2020, Arm Limited or its affiliates. All rights reserved.
+ * Copyright (c) 2021, Arm Limited or its affiliates. All rights reserved.
* SPDX-License-Identifier : Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/api-tests/platform/targets/tgt_dev_apis_stdc/nspe/pal_crypto_config.h b/api-tests/platform/targets/tgt_dev_apis_stdc/nspe/pal_crypto_config.h
index 5b7d785..338509d 100644
--- a/api-tests/platform/targets/tgt_dev_apis_stdc/nspe/pal_crypto_config.h
+++ b/api-tests/platform/targets/tgt_dev_apis_stdc/nspe/pal_crypto_config.h
@@ -26,6 +26,7 @@
#ifndef _PAL_CRYPTO_CONFIG_H_
#define _PAL_CRYPTO_CONFIG_H_
+
/**
* \def ARCH_TEST_RSA
*
diff --git a/api-tests/platform/targets/tgt_ff_tfm_nrf_common/nspe/pal_driver_ipc_intf.c b/api-tests/platform/targets/tgt_ff_tfm_nrf_common/nspe/pal_driver_ipc_intf.c
index 3e6bf7a..821588c 100644
--- a/api-tests/platform/targets/tgt_ff_tfm_nrf_common/nspe/pal_driver_ipc_intf.c
+++ b/api-tests/platform/targets/tgt_ff_tfm_nrf_common/nspe/pal_driver_ipc_intf.c
@@ -130,7 +130,7 @@
**/
int pal_nvmem_read_ns(addr_t base, uint32_t offset, void *buffer, int size)
{
- if (base != 0){
+ if (base != 0) {
/* Unexpected base address */
return PAL_STATUS_ERROR;
}
@@ -149,7 +149,7 @@
**/
int pal_nvmem_write_ns(addr_t base, uint32_t offset, void *buffer, int size)
{
- if (base != 0){
+ if (base != 0) {
/* Unexpected base address */
return PAL_STATUS_ERROR;
}
@@ -168,7 +168,7 @@
{
/* Add logic to terminate the simluation */
- while(1)
+ while (1)
{
__asm volatile("WFI");
}
diff --git a/api-tests/platform/targets/tgt_ff_tfm_nrf_common/spe/pal_driver_intf.c b/api-tests/platform/targets/tgt_ff_tfm_nrf_common/spe/pal_driver_intf.c
index 65373ca..84feaa3 100644
--- a/api-tests/platform/targets/tgt_ff_tfm_nrf_common/spe/pal_driver_intf.c
+++ b/api-tests/platform/targets/tgt_ff_tfm_nrf_common/spe/pal_driver_intf.c
@@ -72,7 +72,7 @@
**/
int pal_nvmem_write(addr_t base, uint32_t offset, void *buffer, int size)
{
- if (base != 0){
+ if (base != 0) {
/* Unexpected base address */
return PAL_STATUS_ERROR;
}
@@ -90,7 +90,7 @@
**/
int pal_nvmem_read(addr_t base, uint32_t offset, void *buffer, int size)
{
- if (base != 0){
+ if (base != 0) {
/* Unexpected base address */
return PAL_STATUS_ERROR;
}
@@ -145,7 +145,7 @@
**/
int pal_wd_timer_is_enabled(addr_t base_addr)
{
- return (pal_wd_cmsdk_is_enabled(base_addr));
+ return pal_wd_cmsdk_is_enabled(base_addr);
}
/**
@@ -175,7 +175,7 @@
@param - void
@return - void
**/
-void EGU5_IRQHandler()
+void EGU5_IRQHandler(void)
{
/* Call TF-M platform interrupt handler */
pal_interrupt_handler();
diff --git a/api-tests/platform/targets/tgt_ff_tfm_nrf_common/spe/pal_driver_intf.h b/api-tests/platform/targets/tgt_ff_tfm_nrf_common/spe/pal_driver_intf.h
index 518f287..b7f86ca 100644
--- a/api-tests/platform/targets/tgt_ff_tfm_nrf_common/spe/pal_driver_intf.h
+++ b/api-tests/platform/targets/tgt_ff_tfm_nrf_common/spe/pal_driver_intf.h
@@ -33,27 +33,32 @@
/**
* @brief Event generator unit type
*/
-typedef struct { /*!< (@ 0x4001B000) EGU0_NS Structure */
- __OM uint32_t TASKS_TRIGGER[16]; /*!< (@ 0x00000000) Description collection: Trigger n for triggering
- the corresponding TRIGGERED[n] event */
- __IM uint32_t RESERVED[16];
- __IOM uint32_t SUBSCRIBE_TRIGGER[16]; /*!< (@ 0x00000080) Description collection: Subscribe configuration
- for task TRIGGER[n] */
- __IM uint32_t RESERVED1[16];
- __IOM uint32_t EVENTS_TRIGGERED[16]; /*!< (@ 0x00000100) Description collection: Event number n generated
- by triggering the corresponding TRIGGER[n]
- task */
- __IM uint32_t RESERVED2[16];
- __IOM uint32_t PUBLISH_TRIGGERED[16]; /*!< (@ 0x00000180) Description collection: Publish configuration
- for event TRIGGERED[n] */
- __IM uint32_t RESERVED3[80];
- __IOM uint32_t INTEN; /*!< (@ 0x00000300) Enable or disable interrupt */
- __IOM uint32_t INTENSET; /*!< (@ 0x00000304) Enable interrupt */
- __IOM uint32_t INTENCLR; /*!< (@ 0x00000308) Disable interrupt */
-} NRF_EGU_Type; /*!< Size = 780 (0x30c) */
+/*!< (@ 0x4001B000) EGU0_NS Structure */
+typedef struct {
+/*!< (@ 0x00000000) Description collection: Trigger n for triggering
+the corresponding TRIGGERED[n] event */
+__OM uint32_t TASKS_TRIGGER[16];
+__IM uint32_t RESERVED[16];
+/*!< (@ 0x00000080) Description collection: Subscribe configuration for task TRIGGER[n] */
+__IOM uint32_t SUBSCRIBE_TRIGGER[16];
+__IM uint32_t RESERVED1[16];
+/*!< (@ 0x00000100) Description collection: Event number n generated by
+ triggering the corresponding TRIGGER[n] task */
+__IOM uint32_t EVENTS_TRIGGERED[16];
+__IM uint32_t RESERVED2[16];
+/*!< (@ 0x00000180) Description collection: Publish configuration for event TRIGGERED[n] */
+__IOM uint32_t PUBLISH_TRIGGERED[16];
+__IM uint32_t RESERVED3[80];
+/*!< (@ 0x00000300) Enable or disable interrupt */
+__IOM uint32_t INTEN;
+/*!< (@ 0x00000304) Enable interrupt */
+__IOM uint32_t INTENSET;
+/*!< (@ 0x00000308) Disable interrupt */
+__IOM uint32_t INTENCLR;
+} NRF_EGU_Type; /*!< Size = 780 (0x30c)*/
/* Define EGU peripheral to be used in tests */
-#define NRF_EGU5_S ((NRF_EGU_Type*) 0x50020000UL)
+#define NRF_EGU5_S ((NRF_EGU_Type *) 0x50020000UL)
#define NRF_EGU5 (NRF_EGU5_S)