clang-format: re-format for clang-18
clang-format-18 isn't compatible with the clang-format-17 output, so we
need to reformat the code with the latest version. The way clang-18
handles lambda formatting also changed, so we have made changes to the
organization default style format to better handle lambda formatting.
See I5e08687e696dd240402a2780158664b7113def0e for updated style.
See Iea0776aaa7edd483fa395e23de25ebf5a6288f71 for clang-18 enablement.
Change-Id: I362352dcb341658501899267c2ff3ad044ed5912
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/subprojects/espi-control/npcm7xx_espi_control.cpp b/subprojects/espi-control/npcm7xx_espi_control.cpp
index 661a48c..8fcf024 100644
--- a/subprojects/espi-control/npcm7xx_espi_control.cpp
+++ b/subprojects/espi-control/npcm7xx_espi_control.cpp
@@ -86,8 +86,8 @@
static inline volatile uint32_t* getReg(stdplus::fd::MMap& map,
size_t regOffset)
{
- uintptr_t regPtr = reinterpret_cast<uintptr_t>(map.get().data()) +
- regOffset;
+ uintptr_t regPtr =
+ reinterpret_cast<uintptr_t>(map.get().data()) + regOffset;
/* Make sure the register pointer is properly aligned. */
assert((regPtr & ~(REGISTER_WIDTH - 1)) == regPtr);
@@ -112,8 +112,8 @@
stdplus::fd::MMap pdidMap(fd, mapLength, ProtFlags().set(ProtFlag::Read),
MMapFlags(MMapAccess::Shared), pageBase);
- volatile uint32_t* const pdidReg = getReg(pdidMap,
- pageOffset + PDID_OFFSET);
+ volatile uint32_t* const pdidReg =
+ getReg(pdidMap, pageOffset + PDID_OFFSET);
/*
* Read the PDID register to make sure we're running on a Nuvoton NPCM7xx
@@ -144,8 +144,8 @@
MMapFlags(MMapAccess::Shared), pageBase);
/* Read the ESPICFG register. */
- volatile uint32_t* const espicfgReg = getReg(espiMap,
- pageOffset + ESPICFG_OFFSET);
+ volatile uint32_t* const espicfgReg =
+ getReg(espiMap, pageOffset + ESPICFG_OFFSET);
uint32_t espicfgValue = *espicfgReg;
if (disable)
@@ -167,8 +167,8 @@
* channel enable bits to the core channel enable bits.
* - Clear the automatic ready bits in ESPIHINDP.
*/
- uint32_t hostChannelEnableBits = espicfgValue &
- ESPICFG_HOST_CHANNEL_ENABLE_MASK;
+ uint32_t hostChannelEnableBits =
+ espicfgValue & ESPICFG_HOST_CHANNEL_ENABLE_MASK;
espicfgValue |= (hostChannelEnableBits >> 4);
*espicfgReg = espicfgValue;