aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH Hartley Sweeten <hartleys@visionengravers.com>2010-01-15 13:25:38 -0500
committerDavid Woodhouse <David.Woodhouse@intel.com>2010-02-25 06:29:48 -0500
commitbcc98a46eafd38968b05e793326f031988c2b2a8 (patch)
tree1ed02d6cdacce5af29bf434eddde5595951fcf61
parent1449c5d0e8f25af6c903797a636696901122e4e8 (diff)
mtd: fix different address space noise
In mtd_ioctl MEMGETREGIONINFO the region_user_info pointer ur is cast in __kernel space. This produces a number of sparse warnings like: warning: cast removes address space of expression warning: incorrect type in initializer (different address spaces) expected unsigned int const [noderef] <asn:1>*register __p got unsigned int *<noident> Since argp is already a void __user * just use it dirrectly without the cast and make ur a __user *. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
-rw-r--r--drivers/mtd/mtdchar.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/mtdchar.c b/drivers/mtd/mtdchar.c
index 5b081cb84351..0a85085fe697 100644
--- a/drivers/mtd/mtdchar.c
+++ b/drivers/mtd/mtdchar.c
@@ -482,7 +482,7 @@ static int mtd_ioctl(struct inode *inode, struct file *file,
482 { 482 {
483 uint32_t ur_idx; 483 uint32_t ur_idx;
484 struct mtd_erase_region_info *kr; 484 struct mtd_erase_region_info *kr;
485 struct region_info_user *ur = (struct region_info_user *) argp; 485 struct region_info_user __user *ur = argp;
486 486
487 if (get_user(ur_idx, &(ur->regionindex))) 487 if (get_user(ur_idx, &(ur->regionindex)))
488 return -EFAULT; 488 return -EFAULT;