From 876d4150aa3da531ddd687b48afada6e43f79146 Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Mon, 2 Mar 2020 15:25:13 -0800 Subject: uhd: Apply clang-format against all .cpp and .hpp files in host/ Note: template_lvbitx.{cpp,hpp} need to be excluded from the list of files that clang-format gets applied against. --- host/lib/rfnoc/null_block_control.cpp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'host/lib/rfnoc/null_block_control.cpp') diff --git a/host/lib/rfnoc/null_block_control.cpp b/host/lib/rfnoc/null_block_control.cpp index 443c2f3d7..8a5ab56a5 100644 --- a/host/lib/rfnoc/null_block_control.cpp +++ b/host/lib/rfnoc/null_block_control.cpp @@ -4,9 +4,9 @@ // SPDX-License-Identifier: GPL-3.0-or-later // +#include #include #include -#include #include namespace { @@ -41,9 +41,9 @@ public: RFNOC_BLOCK_CONSTRUCTOR(null_block_control) { uint32_t initial_state = regs().peek32(REG_CTRL_STATUS); - _streaming = initial_state & 0x2; - _nipc = (initial_state >> 24) & 0xFF; - _item_width = (initial_state >> 16) & 0xFF; + _streaming = initial_state & 0x2; + _nipc = (initial_state >> 24) & 0xFF; + _item_width = (initial_state >> 16) & 0xFF; reset_counters(); register_issue_stream_cmd(); } @@ -121,17 +121,17 @@ public: return regs().peek32(REG_SRC_THROTTLE_CYC); } - uint64_t get_count( - const port_type_t port_type, const count_type_t count_type) + uint64_t get_count(const port_type_t port_type, const count_type_t count_type) { - const uint32_t count_addr_lo = [&](){ + const uint32_t count_addr_lo = [&]() { switch (port_type) { case SOURCE: return count_type == LINES ? REG_SRC_LINE_CNT_LO : REG_SRC_PKT_CNT_LO; case SINK: return count_type == LINES ? REG_SNK_LINE_CNT_LO : REG_SNK_PKT_CNT_LO; case LOOP: - return count_type == LINES ? REG_LOOP_LINE_CNT_LO : REG_LOOP_PKT_CNT_LO; + return count_type == LINES ? REG_LOOP_LINE_CNT_LO + : REG_LOOP_PKT_CNT_LO; default: UHD_THROW_INVALID_CODE_PATH(); } @@ -140,7 +140,6 @@ public: } private: - /*! Action API: Register a handler for stream commands */ void register_issue_stream_cmd() -- cgit v1.2.3