Skip to contentSkip to conversation

m68knommu: Fix typos in Coldfire 5272 DMA debug code

PATCH Greg Ungerer 2 participants 2 messages Feb 10, 2017 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Greg Ungerer

author Acked-by
#1 lore raw

Hi Geert,

Quoted 11 lines · Geert Uytterhoeven

If DEBUG_DMA is defined:

include/asm/dma.h: In function ‘set_dma_mode’:
include/asm/dma.h:392: error: ‘dmabp’ undeclared (first use in this function) include/asm/dma.h:392: error: (Each undeclared identifier is reported only once include/asm/dma.h:392: error: for each function it appears in.) include/asm/dma.h: In function ‘set_dma_addr’:
include/asm/dma.h:423: error: ‘dmawp’ undeclared (first use in this function)

Ultimately I think that all the DEBUG_DMA could just be removed. There is only 4 cases of it, and it doesn't look particularly useful as-is.

Regards
Greg

Quoted 27 lines
---
 arch/m68k/include/asm/dma.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/m68k/include/asm/dma.h +2 -2
index 208b4daa14b334f4..e74b55a690f44eb1 100644
@@ -389,7 +389,7 @@ static __inline__ void set_dma_mode(unsigned int dmanr, char mode)
 
 #ifdef DEBUG_DMA
   printk("%s(%d): dmanr=%d DMR[%x]=%x DIR[%x]=%x\n", __FILE__, __LINE__,
-         dmanr, (int) &dmalp[MCFDMA_DMR], dmabp[MCFDMA_DMR],
+	 dmanr, (int) &dmalp[MCFDMA_DMR], dmalp[MCFDMA_DMR],
 	 (int) &dmawp[MCFDMA_DIR], dmawp[MCFDMA_DIR]);
 #endif
 }
@@ -420,7 +420,7 @@ static __inline__ void set_dma_addr(unsigned int dmanr, unsigned int a)
 
 #ifdef DEBUG_DMA
   printk("%s(%d): dmanr=%d DMR[%x]=%x SAR[%x]=%08x DAR[%x]=%08x\n",
-	__FILE__, __LINE__, dmanr, (int) &dmawp[MCFDMA_DMR], dmawp[MCFDMA_DMR],
+	__FILE__, __LINE__, dmanr, (int) &dmalp[MCFDMA_DMR], dmalp[MCFDMA_DMR],
 	(int) &dmalp[MCFDMA_DSAR], dmalp[MCFDMA_DSAR],
 	(int) &dmalp[MCFDMA_DDAR], dmalp[MCFDMA_DDAR]);
 #endif
#2 lore raw

Hi Greg,

Quoted 13 lines · Greg Ungerer
Quoted 12 lines · Geert Uytterhoeven

If DEBUG_DMA is defined:

include/asm/dma.h: In function ‘set_dma_mode’:
include/asm/dma.h:392: error: ‘dmabp’ undeclared (first use in this
function)
include/asm/dma.h:392: error: (Each undeclared identifier is reported
only once
include/asm/dma.h:392: error: for each function it appears in.) include/asm/dma.h: In function ‘set_dma_addr’:
include/asm/dma.h:423: error: ‘dmawp’ undeclared (first use in this
function)

Quoted 8 lines
Quoted 2 lines

Ultimately I think that all the DEBUG_DMA could just be removed. There is only 4 cases of it, and it doesn't look particularly useful as-is.

I reworked it as part of "m68k/coldfire: Modernize printing of kernel messages", but that needs an update for the received review comments.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds