[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250630105544.531723-2-philip.radford@arm.com>
Date: Mon, 30 Jun 2025 10:55:41 +0000
From: Philip Radford <philip.radford@....com>
To: linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org,
arm-scmi@...r.kernel.org
Cc: sudeep.holla@....com,
cristian.marussi@....com,
luke.parkin@....com,
philip.radford@....com
Subject: [PATCH v2 1/3] firmware: arm_scmi: Add debug decrement counter
Create scmi_dec_count function to decrease any of the Arm SCMI
debug counters. There is already an scmi_inc_count function
but no decrement function.
Reviewed-by: Cristian Marussi <cristian.marussi@....com>
Signed-off-by: Philip Radford <philip.radford@....com>
---
V1->V2
- Amended commit message
---
drivers/firmware/arm_scmi/common.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/firmware/arm_scmi/common.h b/drivers/firmware/arm_scmi/common.h
index dab758c5fdea..c6495c4a0e8a 100644
--- a/drivers/firmware/arm_scmi/common.h
+++ b/drivers/firmware/arm_scmi/common.h
@@ -314,6 +314,12 @@ static inline void scmi_inc_count(atomic_t *arr, int stat)
atomic_inc(&arr[stat]);
}
+static inline void scmi_dec_count(atomic_t *arr, int stat)
+{
+ if (IS_ENABLED(CONFIG_ARM_SCMI_DEBUG_COUNTERS))
+ atomic_dec(&arr[stat]);
+}
+
enum scmi_bad_msg {
MSG_UNEXPECTED = -1,
MSG_INVALID = -2,
--
2.25.1
Powered by blists - more mailing lists