[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20250320092943.92790-1-qiaozhe@iscas.ac.cn>
Date: Thu, 20 Mar 2025 17:29:43 +0800
From: Zhe Qiao <qiaozhe@...as.ac.cn>
To: qiaozhe@...as.ac.cn,
robert.moore@...el.com,
rafael.j.wysocki@...el.com,
lenb@...nel.org
Cc: linux-acpi@...r.kernel.org,
acpica-devel@...ts.linux.dev,
linux-kernel@...r.kernel.org
Subject: [PATCH] ACPICA: Adjust the position of code lines.
In the acpica/utcache.c file, adjust the position of the
"ACPI_MEM_TRACKING(cache->total_allocated++);" code line
to ensure that the increment operation on total_allocated
is included within the ACPI_DBG_TRACK_ALLOCATIONS configuration.
Signed-off-by: Zhe Qiao <qiaozhe@...as.ac.cn>
---
drivers/acpi/acpica/utcache.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/acpi/acpica/utcache.c b/drivers/acpi/acpica/utcache.c
index 85a85f7cf750..046e6ba127d4 100644
--- a/drivers/acpi/acpica/utcache.c
+++ b/drivers/acpi/acpica/utcache.c
@@ -251,9 +251,9 @@ void *acpi_os_acquire_object(struct acpi_memory_list *cache)
} else {
/* The cache is empty, create a new object */
+#ifdef ACPI_DBG_TRACK_ALLOCATIONS
ACPI_MEM_TRACKING(cache->total_allocated++);
-#ifdef ACPI_DBG_TRACK_ALLOCATIONS
if ((cache->total_allocated - cache->total_freed) >
cache->max_occupied) {
cache->max_occupied =
--
2.34.1
Powered by blists - more mailing lists