Skip to contentSkip to conversation

fix SN_DMA_ADDRTYPE() condition

PATCH New Dan Carpenter 1 participant 1 message Jul 15, 2016 Kernel janitors

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix SN_DMA_ADDRTYPE() condition

The parentheses are in the wrong place so it causes a static checker warning. It means we don't mask away the high bits of dma_flags before doing the comparison.

Fixes 83821d3f558d ('[PATCH] PCI: altix: msi support')
arch/ia64/sn/pci/pcibr/pcibr_dma.c +1 -1
index 1e863b2..71c9bf3 100644
@@ -82,7 +82,7 @@ pcibr_dmamap_ate32(struct pcidev_info *info,
 	if (IS_PCIX(pcibus_info))
 		ate_flags &= ~(PCI32_ATE_PREF);
 
-	if (SN_DMA_ADDRTYPE(dma_flags = SN_DMA_ADDR_PHYS))
+	if (SN_DMA_ADDRTYPE(dma_flags) = SN_DMA_ADDR_PHYS)
 		xio_addr = IS_PIC_SOFT(pcibus_info) ? PHYS_TO_DMA(paddr) :
 	    					      PHYS_TO_TIODMA(paddr);
 	else