Patchwork [1/3] Fixing compilation warning for 'nand/omap2.c'

login
register
mail settings
Submitter vimal singh
Date Oct. 30, 2009, 8:42 a.m.
Message ID <ce9ab5790910300142s615c7d59h15bb2d46d4f76574@mail.gmail.com>
Download mbox | patch
Permalink /patch/37259/
State New
Headers show

Comments

vimal singh - Oct. 30, 2009, 8:42 a.m.
Looping Linux-omap mailing list.


From: Vimal Singh <vimalsingh@ti.com>
Date: Fri, 30 Oct 2009 11:31:34 +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 |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

 /**
Artem Bityutskiy - Nov. 3, 2009, 8:18 a.m.
On Fri, 2009-10-30 at 14:12 +0530, Vimal Singh wrote:
> Looping Linux-omap mailing list.
> 
> 
> From: Vimal Singh <vimalsingh@ti.com>
> Date: Fri, 30 Oct 2009 11:31:34 +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 |    6 ++++--
>  1 files changed, 4 insertions(+), 2 deletions(-)

[dedekind@eru l2-mtd-2.6.git]$ scripts/checkpatch.pl vimal
ERROR: patch seems to be corrupt (line wrapped?)
#94: FILE: drivers/mtd/nand/omap2.c:500:
mtd_info *mtd, u_char *buf, int len)

total: 1 errors, 0 warnings, 16 lines checked

vimal has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
[dedekind@eru l2-mtd-2.6.git]$ vim vimal
[dedekind@eru l2-mtd-2.6.git]$ git am vimal
Applying: Fixing compilation warning for 'nand/omap2.c'
fatal: corrupt patch at line 10
Patch failed at 0001 Fixing compilation warning for 'nand/omap2.c'
When you have resolved this problem run "git am --resolved".
If you would prefer to skip this patch, instead run "git am --skip".
To restore the original branch and stop patching run "git am --abort".
[dedekind@eru l2-mtd-2.6.git]$

Patch

diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c
index 090ab87..92573d5 100644
--- a/drivers/mtd/nand/omap2.c
+++ b/drivers/mtd/nand/omap2.c
@@ -501,11 +501,13 @@  static void omap_read_buf_dma_pref(struct
mtd_info *mtd, u_char *buf, int len)
 static void omap_write_buf_dma_pref(struct mtd_info *mtd,
 					const u_char *buf, int len)
 {
+	u_char *p = (u_char *)buf;
+
 	if (len <= mtd->oobsize)
-		omap_write_buf_pref(mtd, buf, len);
+		omap_write_buf_pref(mtd, p, len);
 	else
 		/* start transfer in DMA mode */
-		omap_nand_dma_transfer(mtd, buf, len, 0x1);
+		omap_nand_dma_transfer(mtd, p, len, 0x1);
 }