Re: [PATCH 2/2] sunbmac: Fix compiler warning

From: David Miller
Date: Fri Nov 18 2016 - 14:29:59 EST


From: Tushar Dave <tushar.n.dave@xxxxxxxxxx>
Date: Mon, 17 Oct 2016 13:57:00 -0700

> sunbmac uses '__u32' for dma handle while invoking kernel DMA APIs,
> instead of using dma_addr_t. This hasn't caused any 'incompatible
> pointer type' warning on SPARC because until now dma_addr_t is of
> type u32. However, recent changes in SPARC ATU (iommu) enables 64bit
> DMA and therefore dma_addr_t becomes of type u64. This makes
> 'incompatible pointer type' warnings inevitable.
>
> e.g.
> drivers/net/ethernet/sun/sunbmac.c: In function ʽbigmac_ether_initʼ:
> drivers/net/ethernet/sun/sunbmac.c:1166: warning: passing argument 3 of ʽdma_alloc_coherentʼ from incompatible pointer type
> ./include/linux/dma-mapping.h:445: note: expected ʽdma_addr_t *ʼ but argument is of type ʽ__u32 *ʼ
>
> This patch resolves above compiler warning.
>
> Signed-off-by: Tushar Dave <tushar.n.dave@xxxxxxxxxx>
> Reviewed-by: chris hyser <chris.hyser@xxxxxxxxxx>

Applied.