]> www.infradead.org Git - users/hch/misc.git/commitdiff
drm/amdgpu: Correct the counts of nr_banks and nr_errors
authorCe Sun <cesun102@amd.com>
Thu, 7 Aug 2025 04:36:05 +0000 (12:36 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 27 Aug 2025 17:57:47 +0000 (13:57 -0400)
Correct the counts of nr_banks and nr_errors

Signed-off-by: Ce Sun <cesun102@amd.com>
Reviewed-by: Yang Wang <kevinyang.wang@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_aca.c

index d1e431818212d0b54babbf4baf09f3fe750e653a..9b318044915006f1a46a7f656e96a7fa9884aefd 100644 (file)
@@ -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,6 +239,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;