diff mbox

dma/fsldma: fix a compilation warnings

Message ID 1343743058-8013-1-git-send-email-galak@kernel.crashing.org (mailing list archive)
State Superseded
Delegated to: Kumar Gala
Headers show

Commit Message

Kumar Gala July 31, 2012, 1:57 p.m. UTC
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

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
---
 drivers/dma/fsldma.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Liu Qiang-B32616 July 31, 2012, 2:48 p.m. UTC | #1
Hi Kumar,
Kumar Gala July 31, 2012, 2:53 p.m. UTC | #2
On Jul 31, 2012, at 9:48 AM, Liu Qiang-B32616 wrote:

> Hi Kumar,
> ________________________________________
>> From: Linuxppc-dev [linuxppc-dev-bounces+qiang.liu=freescale.com@lists.ozlabs.org] on behalf of Kumar Gala [galak@kernel.crashing.org]
>> Sent: Tuesday, July 31, 2012 8:57 AM
>> To: dan.j.williams@intel.com
>> Cc: vinod.koul@intel.com; linuxppc-dev@ozlabs.org
>> Subject: [PATCH] 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
>> 
>> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
>> ---
>> drivers/dma/fsldma.c |    2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>> diff --git a/drivers/dma/fsldma.c b/drivers/dma/fsldma.c
>> index 8f84761..6194eb7 100644
>> --- a/drivers/dma/fsldma.c
>> +++ b/drivers/dma/fsldma.c
>> @@ -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;
> I have already submitted a patch to fix it. Please refer to:
> https://lists.ozlabs.org/pipermail/linuxppc-dev/2012-July/099819.html
> 
> Thanks.

Ah, good.. missed it ;)

- k
diff mbox

Patch

diff --git a/drivers/dma/fsldma.c b/drivers/dma/fsldma.c
index 8f84761..6194eb7 100644
--- a/drivers/dma/fsldma.c
+++ b/drivers/dma/fsldma.c
@@ -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);