From: Harvey Harrison Date: Fri, 4 Jul 2008 06:40:13 +0000 (-0700) Subject: [MTD] mtdchar.c silence sparse warning X-Git-Tag: v2.6.27-rc1~69^2~25 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5f6928378b165c4b0d57a711e1c1eb925ad33846;p=pandora-kernel.git [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] *to drivers/mtd/mtdchar.c:527:23: got unsigned int * Signed-off-by: Harvey Harrison Signed-off-by: Andrew Morton Signed-off-by: David Woodhouse --- Reading git-diff-tree failed