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

From: Linus Torvalds
Date: Thu Dec 09 2004 - 18:43:39 EST




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
-
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/