aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLedion Daja <ledion.daja@arm.com>2023-02-17 09:37:58 +0100
committerLedion Daja <ledion.daja@arm.com>2023-03-14 11:21:33 +0100
commitb0aacb484c2316b71909b3b7cb6968879e5bc8ca (patch)
treef8b78eb812023ef9d880fc6f404ff55af7cfc76c /drivers
parent00b8e7beb4fef59c5bef3bc963dfff5bd11718b6 (diff)
downloadethos-u-core-platform-b0aacb484c2316b71909b3b7cb6968879e5bc8ca.tar.gz
Fix SEI CERT coding standard warnings
Change-Id: I47fdf29a50440c82fd9ccf111a846bf87e8a9e29
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mhu_v2/src/mhu_v2.cpp18
-rw-r--r--drivers/mpu/src/mpu.cpp4
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
}