gianfar: fix compile warning
Subsystems (2)
PATCH 1/1 gianfar: fix compile warning
From: Grant Likely <[email protected]>
Eliminate an uninitialized variable warning. The code is correct, but a pointer to the automatic variable 'addr' is passed to dma_alloc_coherent. Since addr has never been initialized, and the compiler doesn't know what dma_alloc_coherent will do with it, it complains.
---
Jeff, this one should go in for 2.6.24
Cheers,
g.
drivers/net/gianfar.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/net/gianfar.c +1 -1
@@ -696,7 +696,7 @@ int startup_gfar(struct net_device *dev) {struct txbd8 *txbdp;struct rxbd8 *rxbdp; -dma_addr_t addr; +dma_addr_t addr =0 ;unsigned long vaddr;int i;struct gfar_private *priv =netdev_priv (dev);
Quoted 11 lines · Grant Likely
From: Grant Likely <[email protected]>
Eliminate an uninitialized variable warning. The code is correct, but a pointer to the automatic variable 'addr' is passed to
dma_alloc_coherent. Since addr has never been initialized, and the compiler doesn't know whatdma_alloc_coherentwill do with it, it complains.Signed-off-by Grant Likely <[email protected]>---
Jeff, this one should go in for 2.6.24
applied #upstream-fixes