Skip to contentSkip to conversation

drm/amdgpu: Correct the counts of nr_banks and nr_errors

PATCH New Ce Sun 1 participant 1 message Aug 17, 2025

Subsystems (2)
lore
Share & tools
lore

Ce Sun

author
#0 lore raw

PATCH 1/4 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 | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_aca.c +2 -0
index cbc40cad581b..090bf6cf1b91 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--;
 	}
 }
 
@@ -229,6 +230,7 @@ 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