Re: [BK PATCH] USB fixes for 2.6.10-rc3

Linus Torvalds
2004-12-09T23:42:01Z

On Thu, 9 Dec 2004, Greg KH wrote:
>
> Greg Kroah-Hartman:
> o USB: fix another sparse warning in the USB core

This one looks incorrect.

The code doesn't _fix_ any warnings. It just shuts them up, without fixing
anything at all.

The fact is "le16_to_cpu()" should act on a le16 value, and sparse
_should_ complain if you pass it the wrong value and ask sparse to check
with -Wbitwise.

But instead of fixing "config->wTotalLength" to be of type "le16", which
would _fix_ the problem, you shut up the valid warning.

If you don't want to see those warnings, don't use -Wbitwise. But don't
just shut them up.

Linus