Skip to contentSkip to conversation

habanalabs: fix double assignment in MMU V1

PATCH Applied Marco Pagani 2 participants 2 messages Nov 29, 2022 – Dec 1, 2022 Char and misc drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 habanalabs: fix double assignment in MMU V1

Removing double assignment of the hop2_pte_addr
variable in dram_default_mapping_fini().

Dead store reported by clang-analyzer.

---
 drivers/misc/habanalabs/common/mmu/mmu_v1.c | 1 -
 1 file changed, 1 deletion(-)
drivers/misc/habanalabs/common/mmu/mmu_v1.c +0 -1
index 8a40de4a4761..d925dc4dd097 100644
@@ -344,7 +344,6 @@ static void dram_default_mapping_fini(struct hl_ctx *ctx)
 		}
 	}
 
-	hop2_pte_addr = hop2_addr;
 	hop2_pte_addr = hop2_addr;
 	for (i = 0 ; i < num_of_hop3 ; i++) {
 		clear_pte(ctx, hop2_pte_addr);
Signature · 1 line
2.38.1
Reviewed-by on v1 1/1 Applied
#1 lore raw
Quoted 24 lines · Marco Pagani

Removing double assignment of the hop2_pte_addr
variable in dram_default_mapping_fini().

Dead store reported by clang-analyzer.

---
 drivers/misc/habanalabs/common/mmu/mmu_v1.c | 1 -
 1 file changed, 1 deletion(-)
drivers/misc/habanalabs/common/mmu/mmu_v1.c +0 -2
index 8a40de4a4761..d925dc4dd097 100644
@@ -344,7 +344,6 @@ static void dram_default_mapping_fini(struct hl_ctx *ctx)
                }
        }
 
-       hop2_pte_addr = hop2_addr;
        hop2_pte_addr = hop2_addr;
        for (i = 0 ; i < num_of_hop3 ; i++) {
                clear_pte(ctx, hop2_pte_addr);
--
Quoted 2 lines

2.38.1

Applied to -next.
Thanks,
Oded