]> git.baikalelectronics.ru Git - kernel.git/commit
[MTD] mtdchar.c silence sparse warning
authorHarvey Harrison <harvey.harrison@gmail.com>
Fri, 4 Jul 2008 06:40:13 +0000 (23:40 -0700)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Fri, 11 Jul 2008 13:46:22 +0000 (14:46 +0100)
commit2963bddfbfcbc5810988c1aeec309e597bf24547
tree905c6374d4667734689a8cb9adf6c411a32aedec
parent895acc97c461298180d27c74fe811bddd38bcd7a
[MTD] mtdchar.c silence sparse warning

The copy_to_user was casting away the address space to get the offset of
the length member.  Use offsetof() instead and add it to the void __user
*argp.

drivers/mtd/mtdchar.c:527:23: warning: cast removes address space of expression
drivers/mtd/mtdchar.c:527:23: warning: incorrect type in argument 1 (different address spaces)
drivers/mtd/mtdchar.c:527:23:    expected void [noderef] <asn:1>*to
drivers/mtd/mtdchar.c:527:23:    got unsigned int *<noident>

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
drivers/mtd/mtdchar.c