From 43293752091ffc10ddefd040a773f35a72414c6a Mon Sep 17 00:00:00 2001 From: Marius Tache <102153746+marius-alex-tache@users.noreply.github.com> Date: Tue, 19 Nov 2024 21:39:50 +0200 Subject: [PATCH] [nxp][platform][k32w0] Remove KVS logs for init phase (#36553) * [nxp][platform][k32w0] Remove KVS logs for init phase Signed-off-by: marius-alex-tache * Restyled by whitespace --------- Signed-off-by: marius-alex-tache Co-authored-by: Restyled.io --- .../nxp/k32w0/KeyValueStoreManagerImpl.cpp | 26 ++++--------------- 1 file changed, 5 insertions(+), 21 deletions(-) diff --git a/src/platform/nxp/k32w0/KeyValueStoreManagerImpl.cpp b/src/platform/nxp/k32w0/KeyValueStoreManagerImpl.cpp index 34666e491ab43e..0ba86d0c4bb967 100644 --- a/src/platform/nxp/k32w0/KeyValueStoreManagerImpl.cpp +++ b/src/platform/nxp/k32w0/KeyValueStoreManagerImpl.cpp @@ -130,35 +130,19 @@ CHIP_ERROR KeyValueStoreManagerImpl::Init() CHIP_ERROR err = CHIP_NO_ERROR; err = sKeysStorage.Init(Internal::RamStorage::kRamBufferInitialSize); - if (err != CHIP_NO_ERROR) - { - ChipLogProgress(DeviceLayer, "Cannot init KVS keys storage with id: %d. Error: %s", kNvmId_KvsKeys, ErrorStr(err)); - } + ReturnErrorOnFailure(err); err = sValuesStorage.Init(Internal::RamStorage::kRamBufferInitialSize, true); - if (err != CHIP_NO_ERROR) - { - ChipLogProgress(DeviceLayer, "Cannot init KVS values storage with id: %d. Error: %s", kNvmId_KvsValues, ErrorStr(err)); - } + ReturnErrorOnFailure(err); err = sSubscriptionStorage.Init(Internal::RamStorage::kRamBufferInitialSize); - if (err != CHIP_NO_ERROR) - { - ChipLogProgress(DeviceLayer, "Cannot init KVS subscription storage with id: %d. Error: %s", kNvmId_KvsSubscription, - ErrorStr(err)); - } + ReturnErrorOnFailure(err); err = sGroupsStorage.Init(Internal::RamStorage::kRamBufferInitialSize, true); - if (err != CHIP_NO_ERROR) - { - ChipLogProgress(DeviceLayer, "Cannot init KVS groups storage with id: %d. Error: %s", kNvmId_KvsGroups, ErrorStr(err)); - } + ReturnErrorOnFailure(err); err = sAclStorage.Init(Internal::RamStorage::kRamBufferInitialSize, true); - if (err != CHIP_NO_ERROR) - { - ChipLogProgress(DeviceLayer, "Cannot init KVS acl storage with id: %d. Error: %s", kNvmId_KvsAcl, ErrorStr(err)); - } + ReturnErrorOnFailure(err); #if CONFIG_CHIP_K32W0_KVS_MOVE_KEYS_TO_SPECIFIC_STORAGE ChipLogProgress(DeviceLayer, "Moving some keys to dedicated storage");