diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mhu_v2/src/mhu_v2.cpp | 18 | ||||
-rw-r--r-- | drivers/mpu/src/mpu.cpp | 4 |
2 files changed, 11 insertions, 11 deletions
diff --git a/drivers/mhu_v2/src/mhu_v2.cpp b/drivers/mhu_v2/src/mhu_v2.cpp index cdeb90b..1c2e2f6 100644 --- a/drivers/mhu_v2/src/mhu_v2.cpp +++ b/drivers/mhu_v2/src/mhu_v2.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020-2021 Arm Limited. All rights reserved. + * SPDX-FileCopyrightText: Copyright 2020-2021, 2023 Arm Limited and/or its affiliates <open-source-office@arm.com> * * SPDX-License-Identifier: Apache-2.0 * @@ -112,9 +112,9 @@ void MHUv2::disableAccessRequest() { void MHUv2::setCombinedClearInterrupt(bool enable) { uint32_t val = txRead(MHUv2_SND_INT_EN_OFFS); if (enable) { - val |= (1 << 2); + val |= (1u << 2); } else { - val &= ~(1 << 2); + val &= ~(1u << 2); } txWrite(MHUv2_SND_INT_EN_OFFS, val); } @@ -126,9 +126,9 @@ void MHUv2::setCombinedClearInterrupt(bool enable) { void MHUv2::setCombinedRecvInterrupt(bool enable) { uint32_t val = rxRead(MHUv2_RCV_INT_EN_OFFS); if (enable) { - val |= (1 << 2); + val |= (1u << 2); } else { - val &= ~(1 << 2); + val &= ~(1u << 2); } rxWrite(MHUv2_SND_INT_EN_OFFS, val); } @@ -137,9 +137,9 @@ void MHUv2::setCombinedRecvInterrupt(bool enable) { void MHUv2::setReadyNotReadyInterrupts(bool enable) { uint32_t val = txRead(MHUv2_SND_INT_EN_OFFS); if (enable) { - val |= (1 << 0 | 1 << 1); + val |= (1u << 0 | 1u << 1); } else { - val &= ~(1 << 0 | 1 << 1); + val &= ~(1u << 0 | 1u << 1); } txWrite(MHUv2_SND_INT_EN_OFFS, val); } @@ -197,12 +197,12 @@ void MHUv2::printAIDR(bool tx, bool rx) { if (tx) { aidr = getTxAIDR(); a = reinterpret_cast<struct aidr_t *>(&aidr); - LOG("TX MHUv2 reports: Major rev: %d, Minor rev: %d", a->ARCH_MAJOR_REV, a->ARCH_MINOR_REV); + LOG("TX MHUv2 reports: Major rev: %u, Minor rev: %u", a->ARCH_MAJOR_REV, a->ARCH_MINOR_REV); } if (rx) { aidr = getRxAIDR(); a = reinterpret_cast<struct aidr_t *>(&aidr); - LOG("RX MHUv2 reports: Major rev: %d, Minor rev: %d", a->ARCH_MAJOR_REV, a->ARCH_MINOR_REV); + LOG("RX MHUv2 reports: Major rev: %u, Minor rev: %u", a->ARCH_MAJOR_REV, a->ARCH_MINOR_REV); } } diff --git a/drivers/mpu/src/mpu.cpp b/drivers/mpu/src/mpu.cpp index bd5c6cd..3f9e62a 100644 --- a/drivers/mpu/src/mpu.cpp +++ b/drivers/mpu/src/mpu.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020-2022 Arm Limited. All rights reserved. + * SPDX-FileCopyrightText: Copyright 2020-2023 Arm Limited and/or its affiliates <open-source-office@arm.com> * * SPDX-License-Identifier: Apache-2.0 * @@ -47,7 +47,7 @@ void dump() { for (size_t region = 0; region < mpuRegions; region++) { MPU->RNR = region; - printf("-- Region %2d - RBAR:%08" PRIx32 " RLAR:%08" PRIx32 "\n", region, MPU->RBAR, MPU->RLAR); + printf("-- Region %2u - RBAR:%08" PRIx32 " RLAR:%08" PRIx32 "\n", region, MPU->RBAR, MPU->RLAR); } #endif } |