Skip to contentSkip to conversation

dma-mapping:do not initialise statics to 0.

PATCH In review Xin Gao 2 participants 2 messages Jul 20, 2022 – Jul 21, 2022 PA-RISC architecture

lore
Share & tools
lore

Xin Gao

author
#0 lore raw

PATCH 1/1 dma-mapping:do not initialise statics to 0.

do not initialise statics to 0.

---
 arch/parisc/kernel/pci-dma.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/parisc/kernel/pci-dma.c +2 -2
index 160996f2198e..ba87f791323b 100644
@@ -36,8 +36,8 @@
 #include <asm/tlbflush.h>	/* for purge_tlb_*() macros */
 
 static struct proc_dir_entry * proc_gsc_root __read_mostly = NULL;
-static unsigned long pcxl_used_bytes __read_mostly = 0;
-static unsigned long pcxl_used_pages __read_mostly = 0;
+static unsigned long pcxl_used_bytes __read_mostly;
+static unsigned long pcxl_used_pages __read_mostly;
 
 extern unsigned long pcxl_dma_start; /* Start of pcxl dma mapping area */
 static DEFINE_SPINLOCK(pcxl_res_lock);
Signature · 1 line
2.30.2
maintainer
#1 lore raw
Quoted 12 lines · Xin Gao

do not initialise statics to 0.

---
 arch/parisc/kernel/pci-dma.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/parisc/kernel/pci-dma.c +0 -0
index 160996f2198e..ba87f791323b 100644

arch/parisc/kernel/pci-dma.c line 38

Quoted 3 lines
arch/parisc/kernel/pci-dma.c +0 -0
@@ -36,8 +36,8 @@
 #include <asm/tlbflush.h>	/* for purge_tlb_*() macros */
 
 static struct proc_dir_entry * proc_gsc_root __read_mostly = NULL;

While at it, you could remove the "= NULL" as well.

Helge

Quoted 7 lines
arch/parisc/kernel/pci-dma.c +2 -2
-static unsigned long pcxl_used_bytes __read_mostly = 0;
-static unsigned long pcxl_used_pages __read_mostly = 0;
+static unsigned long pcxl_used_bytes __read_mostly;
+static unsigned long pcxl_used_pages __read_mostly;
 
 extern unsigned long pcxl_dma_start; /* Start of pcxl dma mapping area */
 static DEFINE_SPINLOCK(pcxl_res_lock);