Skip to content

Commit 9fa1f5a

Browse files
author
Alexander Zilberkant
committed
astyle changes
1 parent 53728e4 commit 9fa1f5a

File tree

3 files changed

+18
-15
lines changed

3 files changed

+18
-15
lines changed

TESTS/psa/prot_internal_storage/its_reset/COMPONENT_PSA_SRV_IMPL/test_pits_impl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ psa_its_status_t test_psa_its_reset_impl(void)
3535
psa_its_status_t status = PSA_ITS_SUCCESS;
3636

3737
int kv_status = kv_init_storage_config();
38-
if(kv_status != MBED_SUCCESS) {
38+
if (kv_status != MBED_SUCCESS) {
3939
return PSA_ITS_ERROR_STORAGE_FAILURE;
4040
}
4141

components/TARGET_PSA/services/psa_prot_internal_storage/COMPONENT_PSA_SRV_EMUL/psa_prot_internal_storage.cpp

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,9 @@
2121
#include "kv_config.h"
2222
#include "mbed_error.h"
2323

24-
#define PSA_ITS_EMUL_PID 1 // In EMUL world, there is no real partitioning, which makes the source partition irrelevant.
25-
// So here we set a global pid value to be used for when calling IMPL functions
24+
// In EMUL world, there is no real partitioning, which makes the source partition irrelevant.
25+
// So here we set a global pid value to be used for when calling IMPL functions
26+
#define PSA_ITS_EMUL_PID 1
2627

2728
psa_its_status_t psa_its_set(uint32_t uid, uint32_t data_length, const void *p_data, psa_its_create_flags_t create_flags)
2829
{
@@ -34,7 +35,7 @@ psa_its_status_t psa_its_set(uint32_t uid, uint32_t data_length, const void *p_d
3435
// - In EMUL (non-secure single core) we do it here since we don't have another context to do it inside.
3536
// - Repeating calls has no effect
3637
int kv_status = kv_init_storage_config();
37-
if(kv_status != MBED_SUCCESS) {
38+
if (kv_status != MBED_SUCCESS) {
3839
return PSA_ITS_ERROR_STORAGE_FAILURE;
3940
}
4041

@@ -53,7 +54,7 @@ psa_its_status_t psa_its_get(uint32_t uid, uint32_t data_offset, uint32_t data_l
5354
// - In EMUL (non-secure single core) we do it here since we don't have another context to do it inside.
5455
// - Repeating calls has no effect
5556
int kv_status = kv_init_storage_config();
56-
if(kv_status != MBED_SUCCESS) {
57+
if (kv_status != MBED_SUCCESS) {
5758
return PSA_ITS_ERROR_STORAGE_FAILURE;
5859
}
5960

@@ -70,7 +71,7 @@ psa_its_status_t psa_its_get_info(uint32_t uid, struct psa_its_info_t *p_info)
7071
// - In EMUL (non-secure single core) we do it here since we don't have another context to do it inside.
7172
// - Repeating calls has no effect
7273
int kv_status = kv_init_storage_config();
73-
if(kv_status != MBED_SUCCESS) {
74+
if (kv_status != MBED_SUCCESS) {
7475
return PSA_ITS_ERROR_STORAGE_FAILURE;
7576
}
7677

@@ -83,7 +84,7 @@ psa_its_status_t psa_its_remove(uint32_t uid)
8384
// - In EMUL (non-secure single core) we do it here since we don't have another context to do it inside.
8485
// - Repeating calls has no effect
8586
int kv_status = kv_init_storage_config();
86-
if(kv_status != MBED_SUCCESS) {
87+
if (kv_status != MBED_SUCCESS) {
8788
return PSA_ITS_ERROR_STORAGE_FAILURE;
8889
}
8990

components/TARGET_PSA/services/psa_prot_internal_storage/COMPONENT_PSA_SRV_IMPL/pits_impl.cpp

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,10 @@ extern "C"
2929
using namespace mbed;
3030

3131
#define STR_EXPAND(tok) #tok
32-
#define PSA_ITS_FILENAME_MAX_LEN 14 // Maximum length of filename we use for kvstore API.
33-
// uid: 6; delimiter: 1; pid: 6; str terminator: 1
32+
33+
// Maximum length of filename we use for kvstore API.
34+
// uid: 6; delimiter: 1; pid: 6; str terminator: 1
35+
#define PSA_ITS_FILENAME_MAX_LEN 14
3436

3537

3638
const uint8_t base64_coding_table[] = {
@@ -91,7 +93,7 @@ psa_its_status_t psa_its_set_impl(uint32_t pid, uint32_t uid, uint32_t data_leng
9193
error("psa_its_set_impl() - Failed getting kvstore instance\n");
9294
}
9395

94-
if((create_flags != 0) && (create_flags != PSA_ITS_WRITE_ONCE_FLAG)) {
96+
if ((create_flags != 0) && (create_flags != PSA_ITS_WRITE_ONCE_FLAG)) {
9597
return PSA_ITS_ERROR_FLAGS_NOT_SUPPORTED;
9698
}
9799

@@ -108,7 +110,7 @@ psa_its_status_t psa_its_set_impl(uint32_t pid, uint32_t uid, uint32_t data_leng
108110

109111
psa_its_status_t status = PSA_ITS_SUCCESS;
110112
if (kvstore_status != MBED_SUCCESS) {
111-
switch(kvstore_status) {
113+
switch (kvstore_status) {
112114
case MBED_ERROR_WRITE_PROTECTED:
113115
status = PSA_ITS_ERROR_WRITE_ONCE;
114116
break;
@@ -139,7 +141,7 @@ psa_its_status_t psa_its_get_impl(uint32_t pid, uint32_t uid, uint32_t data_offs
139141

140142
psa_its_status_t status = PSA_ITS_SUCCESS;
141143
if (kvstore_status != MBED_SUCCESS) {
142-
switch(kvstore_status) {
144+
switch (kvstore_status) {
143145
case MBED_ERROR_ITEM_NOT_FOUND:
144146
status = PSA_ITS_ERROR_KEY_NOT_FOUND;
145147
break;
@@ -170,7 +172,7 @@ psa_its_status_t psa_its_get_impl(uint32_t pid, uint32_t uid, uint32_t data_offs
170172
status = PSA_ITS_ERROR_INCORRECT_SIZE;
171173
}
172174
} else {
173-
switch(kvstore_status) {
175+
switch (kvstore_status) {
174176
case MBED_ERROR_ITEM_NOT_FOUND:
175177
status = PSA_ITS_ERROR_KEY_NOT_FOUND;
176178
break;
@@ -199,7 +201,7 @@ psa_its_status_t psa_its_get_info_impl(uint32_t pid, uint32_t uid, struct psa_it
199201

200202
psa_its_status_t status = PSA_ITS_SUCCESS;
201203
if (kvstore_status != MBED_SUCCESS) {
202-
switch(kvstore_status) {
204+
switch (kvstore_status) {
203205
case MBED_ERROR_ITEM_NOT_FOUND:
204206
status = PSA_ITS_ERROR_KEY_NOT_FOUND;
205207
break;
@@ -234,7 +236,7 @@ psa_its_status_t psa_its_remove_impl(uint32_t pid, uint32_t uid)
234236

235237
psa_its_status_t status = PSA_ITS_SUCCESS;
236238
if (kvstore_status != MBED_SUCCESS) {
237-
switch(kvstore_status) {
239+
switch (kvstore_status) {
238240
case MBED_ERROR_WRITE_PROTECTED:
239241
status = PSA_ITS_ERROR_WRITE_ONCE;
240242
break;

0 commit comments

Comments
 (0)