Skip to contentSkip to conversation

dma/fsldma: fix a compilation warnings

PATCH In review Kumar Gala 2 participants 3 messages Jul 31, 2012

Subsystems (2)
lore
Share & tools
lore

Kumar Gala

author
#0 lore raw

PATCH 1/1 dma/fsldma: fix a compilation warnings

drivers/dma/fsldma.c: In function 'fsl_dma_tx_submit':
drivers/dma/fsldma.c:409:15: warning: 'cookie' may be used uninitialized in this function

---
 drivers/dma/fsldma.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/dma/fsldma.c +1 -1
index 8f84761..6194eb7 100644
@@ -406,7 +406,7 @@ static dma_cookie_t fsl_dma_tx_submit(struct dma_async_tx_descriptor *tx)
 	struct fsl_desc_sw *desc = tx_to_fsl_desc(tx);
 	struct fsl_desc_sw *child;
 	unsigned long flags;
-	dma_cookie_t cookie;
+	dma_cookie_t cookie = 0;
 
 	spin_lock_irqsave(&chan->desc_lock, flags);
 
Signature · 1 line
1.7.9.7
#1 lore raw

Hi Kumar,=0A=
________________________________________=0A=

Quoted 1 line

From: Linuxppc-dev [linuxppc-dev-bounces+qiang.liu=3Dfreescale.com@lists.=

ozlabs.org] on behalf of Kumar Gala [[email protected]]=0A=

Quoted 4 lines

Sent: Tuesday, July 31, 2012 8:57 AM=0A=
To: [email protected]=0A=
Cc: [email protected]; [email protected]=0A=
Subject: [PATCH] dma/fsldma: fix a compilation warnings=0A=

=0A=

Quoted 2 lines

drivers/dma/fsldma.c: In function 'fsl_dma_tx_submit':=0A= drivers/dma/fsldma.c:409:15: warning: 'cookie' may be used uninitialized =

in this function=0A=

drivers/dma/fsldma.c=0A= static dma_cookie_t fsl_dma_tx_submit(struct dma_asyn=

Quoted 11 lines

=0A=

---=0A=
drivers/dma/fsldma.c | 2 +-=0A=

 1 file changed, 1 insertion(+), 1 deletion(-)=0A=

=0A=

drivers/dma/fsldma.c=0A= +0 -0
index 8f84761..6194eb7 100644=0A=
@@ -406,7 +406,7 @@ static dma_cookie_t fsl_dma_tx_submit(struct dma_asyn=

c_tx_descriptor *tx)=0A=

drivers/dma/fsldma.c=0A= static dma_cookie_t fsl_dma_tx_submit(struct dma_asyn= · line 409

Quoted 5 lines
drivers/dma/fsldma.c=0A= +1 -1
       struct fsl_desc_sw *desc =3D tx_to_fsl_desc(tx);=0A=
       struct fsl_desc_sw *child;=0A=
        unsigned long flags;=0A=
-       dma_cookie_t cookie;=0A=
+       dma_cookie_t cookie =3D 0;=0A=

I have already submitted a patch to fix it. Please refer to:=0A=
https://lists.ozlabs.org/pipermail/linuxppc-dev/2012-July/099819.html=0A=
=0A=
Thanks.=0A=
=0A=

Quoted 4 lines
drivers/dma/fsldma.c=0A= +0 -0
        spin_lock_irqsave(&chan->desc_lock, flags);=0A=

=0A=
--=0A=
1.7.9.7=0A=

=0A= _______________________________________________=0A= Linuxppc-dev mailing list=0A= [email protected]=0A=
https://lists.ozlabs.org/listinfo/linuxppc-dev=0A=
=0A=

author
#2 lore raw
Quoted 3 lines · On Jul 31, 2012, at 9:48 AM, Liu Qiang-B32616 wrote:

Hi Kumar,
________________________________________

Quoted 1 line

From: Linuxppc-dev =

[[email protected]] on = behalf of Kumar Gala [[email protected]]

Quoted 7 lines
Quoted 4 lines

Sent: Tuesday, July 31, 2012 8:57 AM
To: [email protected]
Cc: [email protected]; [email protected]
Subject: [PATCH] dma/fsldma: fix a compilation warnings

=20

Quoted 2 lines

drivers/dma/fsldma.c: In function 'fsl_dma_tx_submit':
drivers/dma/fsldma.c:409:15: warning: 'cookie' may be used =

uninitialized in this function

Quoted 11 lines

drivers/dma/fsldma.c static dma_cookie_t fsl_dma_tx_submit(struct =

Quoted 11 lines

=20

---
drivers/dma/fsldma.c | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)

=20

drivers/dma/fsldma.c +0 -0
index 8f84761..6194eb7 100644
@@ -406,7 +406,7 @@ static dma_cookie_t fsl_dma_tx_submit(struct =

dma_async_tx_descriptor *tx)

Quoted 9 lines

drivers/dma/fsldma.c static dma_cookie_t fsl_dma_tx_submit(struct dma_async_tx_descriptor *tx)

Quoted 5 lines
drivers/dma/fsldma.c +1 -1
     struct fsl_desc_sw *desc =3D tx_to_fsl_desc(tx);
     struct fsl_desc_sw *child;
      unsigned long flags;
-       dma_cookie_t cookie;
+       dma_cookie_t cookie =3D 0;

I have already submitted a patch to fix it. Please refer to:
https://lists.ozlabs.org/pipermail/linuxppc-dev/2012-July/099819.html
=20
Thanks.

Ah, good.. missed it ;)

- k=