Patchwork [1/3,NAND,OMAP] : Fixing compilation warning for 'nand/omap2.c'

login
register
mail settings
Submitter vimal singh
Date Jan. 6, 2010, 2 p.m.
Message ID <ce9ab5791001060600q1bef6ff5x602519e7db9e145@mail.gmail.com>
Download mbox | patch
Permalink /patch/42293/
State New, archived
Headers show

Comments

vimal singh - Jan. 6, 2010, 2 p.m.
From 3e856346f93afaf3f519dffe7987e4bbf56a136d Mon Sep 17 00:00:00 2001
From: Vimal Singh <vimalsingh@ti.com>
Date: Tue, 5 Jan 2010 12:49:24 +0530
Subject: [PATCH] Fixing compilation warning for 'nand/omap2.c'

Fixing below warning in compilation:
drivers/mtd/nand/omap2.c: In function 'omap_write_buf_dma_pref':
drivers/mtd/nand/omap2.c:508: warning: passing argument 2 of
'omap_nand_dma_transfer' discards qualifiers from pointer target type

Signed-off-by: Vimal Singh <vimalsingh@ti.com>
---
 drivers/mtd/nand/omap2.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Sanjeev Premi - Jan. 8, 2010, 3:01 p.m.
> -----Original Message-----
> From: linux-omap-owner@vger.kernel.org 
> [mailto:linux-omap-owner@vger.kernel.org] On Behalf Of Vimal Singh
> Sent: Wednesday, January 06, 2010 7:30 PM
> To: Linux MTD
> Cc: linux-omap@vger.kernel.org
> Subject: [PATCH 1/3][NAND][OMAP]: Fixing compilation warning 
> for 'nand/omap2.c'
> 
> From 3e856346f93afaf3f519dffe7987e4bbf56a136d Mon Sep 17 00:00:00 2001
> From: Vimal Singh <vimalsingh@ti.com>
> Date: Tue, 5 Jan 2010 12:49:24 +0530
> Subject: [PATCH] Fixing compilation warning for 'nand/omap2.c'
> 
> Fixing below warning in compilation:
> drivers/mtd/nand/omap2.c: In function 'omap_write_buf_dma_pref':
> drivers/mtd/nand/omap2.c:508: warning: passing argument 2 of
> 'omap_nand_dma_transfer' discards qualifiers from pointer target type
> 
> Signed-off-by: Vimal Singh <vimalsingh@ti.com>
> ---
>  drivers/mtd/nand/omap2.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c
> index 1bb799f..4eea97c 100644
> --- a/drivers/mtd/nand/omap2.c
> +++ b/drivers/mtd/nand/omap2.c
> @@ -505,7 +505,7 @@ static void 
> omap_write_buf_dma_pref(struct mtd_info *mtd,
>  		omap_write_buf_pref(mtd, buf, len);
>  	else
>  		/* start transfer in DMA mode */
> -		omap_nand_dma_transfer(mtd, buf, len, 0x1);
> +		omap_nand_dma_transfer(mtd, (u_char *) buf, len, 0x1);
>  }

Vimal,

I had posted the fix in DEC. Did you miss it?
http://lists.infradead.org/pipermail/linux-mtd/2009-December/028373.html

Best regards,
Sanjeev

> 
>  /**
> -- 
> 1.5.5
> --
> To unsubscribe from this list: send the line "unsubscribe 
> linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
vimal singh - Jan. 8, 2010, 3:34 p.m.
On Fri, Jan 8, 2010 at 8:31 PM, Premi, Sanjeev <premi@ti.com> wrote:
>> -----Original Message-----
>> From: linux-omap-owner@vger.kernel.org
>> [mailto:linux-omap-owner@vger.kernel.org] On Behalf Of Vimal Singh
>> Sent: Wednesday, January 06, 2010 7:30 PM
>> To: Linux MTD
>> Cc: linux-omap@vger.kernel.org
>> Subject: [PATCH 1/3][NAND][OMAP]: Fixing compilation warning
>> for 'nand/omap2.c'
>>
>> From 3e856346f93afaf3f519dffe7987e4bbf56a136d Mon Sep 17 00:00:00 2001
>> From: Vimal Singh <vimalsingh@ti.com>
>> Date: Tue, 5 Jan 2010 12:49:24 +0530
>> Subject: [PATCH] Fixing compilation warning for 'nand/omap2.c'
>>
>> Fixing below warning in compilation:
>> drivers/mtd/nand/omap2.c: In function 'omap_write_buf_dma_pref':
>> drivers/mtd/nand/omap2.c:508: warning: passing argument 2 of
>> 'omap_nand_dma_transfer' discards qualifiers from pointer target type
>>
>> Signed-off-by: Vimal Singh <vimalsingh@ti.com>
>> ---
>>  drivers/mtd/nand/omap2.c |    2 +-
>>  1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c
>> index 1bb799f..4eea97c 100644
>> --- a/drivers/mtd/nand/omap2.c
>> +++ b/drivers/mtd/nand/omap2.c
>> @@ -505,7 +505,7 @@ static void
>> omap_write_buf_dma_pref(struct mtd_info *mtd,
>>               omap_write_buf_pref(mtd, buf, len);
>>       else
>>               /* start transfer in DMA mode */
>> -             omap_nand_dma_transfer(mtd, buf, len, 0x1);
>> +             omap_nand_dma_transfer(mtd, (u_char *) buf, len, 0x1);
>>  }
>
> Vimal,
>
> I had posted the fix in DEC. Did you miss it?
> http://lists.infradead.org/pipermail/linux-mtd/2009-December/028373.html
>

I did. But I wanted to have all of these together. In fact I had
posted a patch for this sometime back, which was handling this quite
differently.
http://patchwork.kernel.org/patch/57235/

Patch

diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c
index 1bb799f..4eea97c 100644
--- a/drivers/mtd/nand/omap2.c
+++ b/drivers/mtd/nand/omap2.c
@@ -505,7 +505,7 @@  static void omap_write_buf_dma_pref(struct mtd_info *mtd,
 		omap_write_buf_pref(mtd, buf, len);
 	else
 		/* start transfer in DMA mode */
-		omap_nand_dma_transfer(mtd, buf, len, 0x1);
+		omap_nand_dma_transfer(mtd, (u_char *) buf, len, 0x1);
 }

 /**