From b1008f2b568db92524edc1732fc80198690f5182 Mon Sep 17 00:00:00 2001 From: Logan Weber Date: Sun, 10 Nov 2019 14:29:26 -0800 Subject: [PATCH] Lint --- .../micro/device/arm/stm32f746xx/utvm_timer.c | 2 +- src/runtime/micro/micro_session.cc | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/runtime/micro/device/arm/stm32f746xx/utvm_timer.c b/src/runtime/micro/device/arm/stm32f746xx/utvm_timer.c index 8766d9a793aeb..0651b4f4fe640 100644 --- a/src/runtime/micro/device/arm/stm32f746xx/utvm_timer.c +++ b/src/runtime/micro/device/arm/stm32f746xx/utvm_timer.c @@ -58,7 +58,7 @@ uint32_t stop_time = 0; int32_t UTVMTimerStart() { SYST_CSR = (1 << SYST_CSR_ENABLE) | (1 << SYST_CSR_CLKSOURCE); // wait until timer starts - while (SYST_CVR == 0); + while (SYST_CVR == 0) {} start_time = SYST_CVR; return 0; } diff --git a/src/runtime/micro/micro_session.cc b/src/runtime/micro/micro_session.cc index 63fa4efc0ed79..099a35a5eafae 100644 --- a/src/runtime/micro/micro_session.cc +++ b/src/runtime/micro/micro_session.cc @@ -186,10 +186,11 @@ MicroSession::MicroSession( runtime_symbol_map_ = LoadBinary(binary_path, false).symbol_map; - // Patch pointers to define the bounds of the workspace section and the word size (for allocation alignment). - std::shared_ptr workspace_allocator = GetAllocator(SectionKind::kWorkspace); - uint64_t ws_start = workspace_allocator->start_addr().value(); - uint64_t ws_end = workspace_allocator->max_addr().value(); + // Patch pointers to define the bounds of the workspace section and the word + // size (for allocation alignment). + std::shared_ptr ws_allocator = GetAllocator(SectionKind::kWorkspace); + uint64_t ws_start = ws_allocator->start_addr().value(); + uint64_t ws_end = ws_allocator->max_addr().value(); if (word_size_ == 4) { uint32_t workspace_start_addr = (uint32_t) ws_start; uint32_t workspace_end_addr = (uint32_t) ws_end; @@ -407,7 +408,8 @@ DevPtr MicroSession::EncoderAppend(TargetDataLayoutEncoder* encoder, const TVMAr }; // Update the device type to look like a host, because codegen generates // checks that it is a host array. - CHECK(dev_arr.ctx.device_type == static_cast(kDLMicroDev)) << "attempt to write TVMArray with non-micro device type"; + CHECK(dev_arr.ctx.device_type == static_cast(kDLMicroDev)) + << "attempt to write TVMArray with non-micro device type"; dev_arr.ctx.device_type = DLDeviceType::kDLCPU; tvm_arr_slot.WriteValue(dev_arr); return tvm_arr_slot.start_addr();