* [PATCH] gianfar: fix compile warning
@ 2007-12-02 5:10 Grant Likely
2007-12-04 20:07 ` Jeff Garzik
0 siblings, 1 reply; 3+ messages in thread
From: Grant Likely @ 2007-12-02 5:10 UTC (permalink / raw)
To: linuxppc-dev, netdev, galak, jgarzik, afleming
From: Grant Likely <grant.likely@secretlab.ca>
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.
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---
Jeff, this one should go in for 2.6.24
Cheers,
g.
drivers/net/gianfar.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c
index 38268d7..0431e9e 100644
--- a/drivers/net/gianfar.c
+++ b/drivers/net/gianfar.c
@@ -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);
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] gianfar: fix compile warning
2007-12-02 5:10 [PATCH] gianfar: fix compile warning Grant Likely
@ 2007-12-04 20:07 ` Jeff Garzik
0 siblings, 0 replies; 3+ messages in thread
From: Jeff Garzik @ 2007-12-04 20:07 UTC (permalink / raw)
To: Grant Likely; +Cc: linuxppc-dev, netdev
Grant Likely wrote:
> From: Grant Likely <grant.likely@secretlab.ca>
>
> 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.
>
> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
> ---
>
> Jeff, this one should go in for 2.6.24
applied #upstream-fixes
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] gianfar: fix compile warning
@ 2007-10-18 3:54 Grant Likely
0 siblings, 0 replies; 3+ messages in thread
From: Grant Likely @ 2007-10-18 3:54 UTC (permalink / raw)
To: Li Yang, Jeff Garzik, linuxppc-dev, netdev
From: Grant Likely <grant.likely@secretlab.ca>
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.
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---
drivers/net/gianfar.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c
index cc288d8..c009ab6 100644
--- a/drivers/net/gianfar.c
+++ b/drivers/net/gianfar.c
@@ -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);
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-12-04 20:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-02 5:10 [PATCH] gianfar: fix compile warning Grant Likely
2007-12-04 20:07 ` Jeff Garzik
-- strict thread matches above, loose matches on Subject: below --
2007-10-18 3:54 Grant Likely
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).