Skip to contentSkip to conversation

LoongArch: Remove a bogus reference to ZONE_DMA

PATCH Applied Petr Tesarik 3 participants 3 messages Apr 3, 2025 – Apr 26, 2025 LoongArch

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 LoongArch: Remove a bogus reference to ZONE_DMA

Remove dead code. LoongArch does not have a DMA memory zone. The architecture does not even define MAX_DMA_PFN.

---
 arch/loongarch/mm/init.c | 3 ---
 1 file changed, 3 deletions(-)
arch/loongarch/mm/init.c +0 -3
index ca5aa5f46a9f..7fab370efa74 100644
@@ -65,9 +65,6 @@ void __init paging_init(void)
 {
 	unsigned long max_zone_pfns[MAX_NR_ZONES];
 
-#ifdef CONFIG_ZONE_DMA
-	max_zone_pfns[ZONE_DMA] = MAX_DMA_PFN;
-#endif
 #ifdef CONFIG_ZONE_DMA32
 	max_zone_pfns[ZONE_DMA32] = MAX_DMA32_PFN;
 #endif
Signature · 1 line
2.48.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Petr Tesarik

Remove dead code. LoongArch does not have a DMA memory zone. The architecture does not even define MAX_DMA_PFN.

Quoted 21 lines
---
 arch/loongarch/mm/init.c | 3 ---
 1 file changed, 3 deletions(-)
arch/loongarch/mm/init.c +0 -3
index ca5aa5f46a9f..7fab370efa74 100644
@@ -65,9 +65,6 @@ void __init paging_init(void)
 {
 	unsigned long max_zone_pfns[MAX_NR_ZONES];
 
-#ifdef CONFIG_ZONE_DMA
-	max_zone_pfns[ZONE_DMA] = MAX_DMA_PFN;
-#endif
 #ifdef CONFIG_ZONE_DMA32
 	max_zone_pfns[ZONE_DMA32] = MAX_DMA32_PFN;
 #endif
Signature · 1 line
2.48.1
Signature · 2 lines
Sincerely yours,
Mike.
maintainer Applied
#2 lore raw
In reply to Petr Tesarik

Applied, thanks.

Huacai

Quoted 26 lines · Petr Tesarik

Remove dead code. LoongArch does not have a DMA memory zone. The architecture does not even define MAX_DMA_PFN.

---
 arch/loongarch/mm/init.c | 3 ---
 1 file changed, 3 deletions(-)
arch/loongarch/mm/init.c +0 -4
index ca5aa5f46a9f..7fab370efa74 100644
@@ -65,9 +65,6 @@ void __init paging_init(void)
 {
        unsigned long max_zone_pfns[MAX_NR_ZONES];
 
-#ifdef CONFIG_ZONE_DMA
-       max_zone_pfns[ZONE_DMA] = MAX_DMA_PFN;
-#endif
 #ifdef CONFIG_ZONE_DMA32
        max_zone_pfns[ZONE_DMA32] = MAX_DMA32_PFN;
 #endif
--

2.48.1