Commit c767db5147f0f257accbb26639a2b916d5ffb1e6

Authored by Olof Johansson
Committed by David S. Miller
1 parent c45f812f02

net: eth: davinci_cpdma: 64-bit phys/dma_addr_t cleanup

Silences the below warnings when building with ARM_LPAE enabled, which
gives longer dma_addr_t by default:

drivers/net/ethernet/ti/davinci_cpdma.c: In function 'cpdma_desc_pool_create':
drivers/net/ethernet/ti/davinci_cpdma.c:182:3: warning: passing argument 3 of 'dma_alloc_attrs' from incompatible pointer type [enabled by default]
drivers/net/ethernet/ti/davinci_cpdma.c: In function 'desc_phys':
drivers/net/ethernet/ti/davinci_cpdma.c:222:25: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
drivers/net/ethernet/ti/davinci_cpdma.c:223:8: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: David S. Miller <davem@davemloft.net>

Showing 1 changed file with 2 additions and 3 deletions Side-by-side Diff

drivers/net/ethernet/ti/davinci_cpdma.c
... ... @@ -81,7 +81,7 @@
81 81 };
82 82  
83 83 struct cpdma_desc_pool {
84   - u32 phys;
  84 + phys_addr_t phys;
85 85 u32 hw_addr;
86 86 void __iomem *iomap; /* ioremap map */
87 87 void *cpumap; /* dma_alloc map */
... ... @@ -219,8 +219,7 @@
219 219 {
220 220 if (!desc)
221 221 return 0;
222   - return pool->hw_addr + (__force dma_addr_t)desc -
223   - (__force dma_addr_t)pool->iomap;
  222 + return pool->hw_addr + (__force long)desc - (__force long)pool->iomap;
224 223 }
225 224  
226 225 static inline struct cpdma_desc __iomem *