Skip to contentSkip to conversation

drm/amdgpu: Correct the counts of nr_banks and nr_errors

PATCH Superseded Ce Sun 1 participant 1 message Aug 12, 2025

Subsystems (2)

v1 of 5 Superseded Latest is v5 →

lore
Share & tools
lore

Ce Sun

author
#0 lore raw

PATCH 1/3 drm/amdgpu: Correct the counts of nr_banks and nr_errors

Correct the counts of nr_banks and nr_errors

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_aca.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_aca.c +3 -0
index d1e431818212..d14dee8d6632 100644
@@ -76,6 +76,7 @@ static void aca_banks_release(struct aca_banks *banks)
 	list_for_each_entry_safe(node, tmp, &banks->list, node) {
 		list_del(&node->node);
 		kvfree(node);
+		banks->nr_banks--;
 	}
 }
 
@@ -238,8 +239,10 @@ static struct aca_bank_error *new_bank_error(struct aca_error *aerr, struct aca_
 
 	mutex_lock(&aerr->lock);
 	list_add_tail(&bank_error->node, &aerr->list);
+	aerr->nr_errors++;
 	mutex_unlock(&aerr->lock);
 
+
 	return bank_error;
 }
 
Signature · 1 line
2.34.1