Skip to contentSkip to conversation

USB: musb: dereferencing an iomem pointer

PATCH Applied Dan Carpenter 2 participants 2 messages Mar 20, 2011 – Mar 22, 2011

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 4/4 USB: musb: dereferencing an iomem pointer

"tx_ram" points to io memory. We can't dereference it directly. Sparse complains about this: "drivers/usb/musb/cppi_dma.c:1205:25: warning:
dereference of noderef expression"

---
Compile tested.

drivers/usb/musb/cppi_dma.c +1 -1
index eb9161a..ab434fb 100644
@@ -1204,7 +1204,7 @@ irqreturn_t cppi_interrupt(int irq, void *dev_id)
 		 */
 		if (NULL = bd) {
 			DBG(1, "null BD\n");
-			tx_ram->tx_complete = 0;
+			musb_writel(&tx_ram->tx_complete, 0, 0);
 			continue;
 		}
 
Applied
#1 lore raw
Quoted 5 lines · Dan Carpenter

"tx_ram" points to io memory. We can't dereference it directly. Sparse complains about this: "drivers/usb/musb/cppi_dma.c:1205:25: warning:
dereference of noderef expression"

applied, thanks

Signature · 1 line
balbi