From b5951a3aa234e0e9e888b93c9b335b8c8ed1be4b Mon Sep 17 00:00:00 2001 From: Michael Rupp Date: Tue, 6 Aug 2024 16:06:20 -0400 Subject: [PATCH 1/3] Use provision storage manager singleton --- .../silabs/multi-ota/OTAFactoryDataProcessor.cpp | 11 +++++------ .../silabs/multi-ota/OTAFactoryDataProcessor.h | 4 ++-- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/platform/silabs/multi-ota/OTAFactoryDataProcessor.cpp b/src/platform/silabs/multi-ota/OTAFactoryDataProcessor.cpp index 8d38207df35542..a39a39b8f3aa87 100644 --- a/src/platform/silabs/multi-ota/OTAFactoryDataProcessor.cpp +++ b/src/platform/silabs/multi-ota/OTAFactoryDataProcessor.cpp @@ -22,7 +22,7 @@ namespace chip { -using FactoryProvider = DeviceLayer::Silabs::Provision::Storage; +using namespace ::chip::DeviceLayer::Silabs; CHIP_ERROR OTAFactoryDataProcessor::Init() { @@ -146,21 +146,20 @@ CHIP_ERROR OTAFactoryDataProcessor::Update(uint8_t tag, Optional & opt CHIP_ERROR OTAFactoryDataProcessor::UpdateValue(uint8_t tag, ByteSpan & newValue) { - FactoryProvider factoryProvider; switch (tag) { case (int) FactoryTags::kDacKey: ChipLogProgress(SoftwareUpdate, "Set Device Attestation Key"); - return factoryProvider.FactoryProvider::SetDeviceAttestationKey(newValue); + return Provision::Manager::GetInstance().GetStorage().SetDeviceAttestationKey(newValue); case (int) FactoryTags::kDacCert: ChipLogProgress(SoftwareUpdate, "Set Device Attestation Cert"); - return factoryProvider.FactoryProvider::SetDeviceAttestationCert(newValue); + return Provision::Manager::GetInstance().GetStorage().SetDeviceAttestationCert(newValue); case (int) FactoryTags::kPaiCert: ChipLogProgress(SoftwareUpdate, "Set Product Attestionation Intermediate Cert"); - return factoryProvider.FactoryProvider::SetProductAttestationIntermediateCert(newValue); + return Provision::Manager::GetInstance().GetStorage().SetProductAttestationIntermediateCert(newValue); case (int) FactoryTags::kCdCert: ChipLogProgress(SoftwareUpdate, "Set Certification Declaration"); - return factoryProvider.FactoryProvider::SetCertificationDeclaration(newValue); + return Provision::Manager::GetInstance().GetStorage().SetCertificationDeclaration(newValue); } ChipLogError(DeviceLayer, "Failed to find tag %d.", tag); diff --git a/src/platform/silabs/multi-ota/OTAFactoryDataProcessor.h b/src/platform/silabs/multi-ota/OTAFactoryDataProcessor.h index f7fd106de17220..55c3b25a8d2f71 100644 --- a/src/platform/silabs/multi-ota/OTAFactoryDataProcessor.h +++ b/src/platform/silabs/multi-ota/OTAFactoryDataProcessor.h @@ -22,8 +22,8 @@ #include #include #include -#include // nogncheck -#include // nogncheck +#include +#include namespace chip { From 3206fed4132af858bb72aa48ba1100fcdab3b517 Mon Sep 17 00:00:00 2001 From: "Restyled.io" Date: Tue, 6 Aug 2024 20:40:32 +0000 Subject: [PATCH 2/3] Restyled by clang-format --- src/platform/silabs/multi-ota/OTAFactoryDataProcessor.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/platform/silabs/multi-ota/OTAFactoryDataProcessor.h b/src/platform/silabs/multi-ota/OTAFactoryDataProcessor.h index 55c3b25a8d2f71..da325bbba16110 100644 --- a/src/platform/silabs/multi-ota/OTAFactoryDataProcessor.h +++ b/src/platform/silabs/multi-ota/OTAFactoryDataProcessor.h @@ -18,12 +18,12 @@ #pragma once +#include +#include #include #include #include #include -#include -#include namespace chip { From 13a7b0a185ad2b6e005f4c42452ddc53961c74db Mon Sep 17 00:00:00 2001 From: Michael Rupp Date: Wed, 7 Aug 2024 09:39:33 -0400 Subject: [PATCH 3/3] rekick ci