From 6e7cf4e621468523069d69a9a4734614debe3c39 Mon Sep 17 00:00:00 2001 From: "Restyled.io" Date: Thu, 17 Aug 2023 18:52:23 +0000 Subject: [PATCH] Restyled by clang-format --- .../silabs/SilabsDeviceAttestationCreds.cpp | 18 +++++++++--------- src/platform/silabs/MigrationManager.cpp | 3 +-- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/examples/platform/silabs/SilabsDeviceAttestationCreds.cpp b/examples/platform/silabs/SilabsDeviceAttestationCreds.cpp index 8b097db056b92c..53590ff2b7672d 100644 --- a/examples/platform/silabs/SilabsDeviceAttestationCreds.cpp +++ b/examples/platform/silabs/SilabsDeviceAttestationCreds.cpp @@ -15,12 +15,12 @@ * limitations under the License. */ #include "SilabsDeviceAttestationCreds.h" +#include #include #include #include #include #include -#include #include #include "silabs_creds.h" @@ -48,7 +48,7 @@ class DeviceAttestationCredsSilabs : public DeviceAttestationCredentialsProvider { // Provisioned CD return GetFile("GetCertificationDeclaration", SilabsConfig::kConfigKey_Creds_CD_Offset, SILABS_CREDENTIALS_CD_OFFSET, - SilabsConfig::kConfigKey_Creds_CD_Size, SILABS_CREDENTIALS_CD_SIZE, out_span); + SilabsConfig::kConfigKey_Creds_CD_Size, SILABS_CREDENTIALS_CD_SIZE, out_span); } else { @@ -70,7 +70,7 @@ class DeviceAttestationCredsSilabs : public DeviceAttestationCredentialsProvider { // Provisioned DAC return GetFile("GetDeviceAttestationCert", SilabsConfig::kConfigKey_Creds_DAC_Offset, SILABS_CREDENTIALS_DAC_OFFSET, - SilabsConfig::kConfigKey_Creds_DAC_Size, SILABS_CREDENTIALS_DAC_SIZE, out_span); + SilabsConfig::kConfigKey_Creds_DAC_Size, SILABS_CREDENTIALS_DAC_SIZE, out_span); } else { @@ -85,8 +85,8 @@ class DeviceAttestationCredsSilabs : public DeviceAttestationCredentialsProvider { // Provisioned PAI return GetFile("GetProductAttestationIntermediateCert", SilabsConfig::kConfigKey_Creds_PAI_Offset, - SILABS_CREDENTIALS_PAI_OFFSET, SilabsConfig::kConfigKey_Creds_PAI_Size, SILABS_CREDENTIALS_PAI_SIZE, - out_span); + SILABS_CREDENTIALS_PAI_OFFSET, SilabsConfig::kConfigKey_Creds_PAI_Size, SILABS_CREDENTIALS_PAI_SIZE, + out_span); } else { @@ -110,7 +110,7 @@ class DeviceAttestationCredsSilabs : public DeviceAttestationCredentialsProvider psa_status_t err = psa_sign_message(static_cast(key_id), PSA_ALG_ECDSA(PSA_ALG_SHA_256), message_to_sign.data(), - message_to_sign.size(), signature, signature_size, &signature_size); + message_to_sign.size(), signature, signature_size, &signature_size); VerifyOrReturnError(!err, CHIP_ERROR_INTERNAL); return CopySpanToMutableSpan(ByteSpan(signature, signature_size), out_span); @@ -127,9 +127,9 @@ class DeviceAttestationCredsSilabs : public DeviceAttestationCredentialsProvider uint32_t size_default, MutableByteSpan & out_span) { uint32_t base_addr = 0; - uint8_t * address = nullptr; - uint32_t offset = offset_default; - uint32_t size = size_default; + uint8_t * address = nullptr; + uint32_t offset = offset_default; + uint32_t size = size_default; ReturnErrorOnFailure(SilabsConfig::ReadConfigValue(SilabsConfig::kConfigKey_Creds_Base_Addr, base_addr)); address = (uint8_t *) (base_addr + offset); diff --git a/src/platform/silabs/MigrationManager.cpp b/src/platform/silabs/MigrationManager.cpp index f6a10958c7941b..e07b730e67f048 100644 --- a/src/platform/silabs/MigrationManager.cpp +++ b/src/platform/silabs/MigrationManager.cpp @@ -37,8 +37,7 @@ typedef struct #define COUNT_OF(A) (sizeof(A) / sizeof((A)[0])) static migrationData_t migrationTable[] = { - { .migrationGroup = 1, .migrationFunc = MigrateKvsMap }, - { .migrationGroup = 2, .migrationFunc = MigrateDacProvider }, + { .migrationGroup = 1, .migrationFunc = MigrateKvsMap }, { .migrationGroup = 2, .migrationFunc = MigrateDacProvider }, // add any additional migration neccesary. migrationGroup should stay equal if done in the same commit or increment by 1 for // each new entry. };