Re: [PATCH] Altix system controller communication driver

From: Greg Howard
Date: Thu Jul 29 2004 - 14:48:04 EST


On Wed, 28 Jul 2004, Sam Ravnborg wrote:

> I would also recommend running it through sparse.
> http://sparse.bkbits.net
> davej has a .tar.gz package somewhere at www.codemonkey.org.uk.
>
> I did not see any particular issue, but noticed no __user annotations
> around copy_{to,from}_user().

I did add the __user annotations to the parameters in scdrv_read() and
scdrv_write(). But I had trouble coming up with a type-casting chant
around my invocations of copy_{to,from}_user() that would satisfy
sparse. No matter what I did it still gave me some warnings.

FWIW I looked through a couple of other drivers (and ran them through
sparse to see what would happen), and I discovered that I seem to be
in good company as far as this is concerned... Are there any examples
of a use of copy_{to,from}_user() that use char* parameters (perhaps
cast to something else), but don't cause sparse to complain?

Thanks - Greg
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/