[PATCH] staging: vt6655: preserve address space by not casting
Dan Carpenter
dan.carpenter at oracle.com
Mon Jun 16 07:55:56 UTC 2014
On Fri, Jun 13, 2014 at 12:11:51PM +0200, Martin Kepplinger wrote:
> Fix the sparse error: cast removes address space of expression.
> ---
> Is that even correct?
It's correct but not complete.
vt6655 impliment their own versions of ethtool_ioctl() when they should
be using the standard versions.
The vt6655 version of ethtool_ioctl() should be annotated so it's marked
that the second parameter is marked as a __user pointer. It doesn't
print a Sparse warning because at a certain point Sparse just says:
"warning: too many warnings" and gives up.
> I haven't signed-off on it yet.
> ethtool_ioctl() takes a (void *) as user data, dereferenced and assigend to u32.
> applies to next-20140611
It doesn't dereference the pointer. You are getting mixed up with the
vt6656 version of ethtool_ioctl() I think? You're not allowed to
dereference __user pointers.
regards,
dan carpenter
More information about the devel
mailing list