]> git.baikalelectronics.ru Git - kernel.git/commit
USB: xhci: unsigned char never equals -1
authorDan Carpenter <error27@gmail.com>
Thu, 17 Mar 2011 19:39:49 +0000 (22:39 +0300)
committerSarah Sharp <sarah.a.sharp@linux.intel.com>
Wed, 13 Apr 2011 23:19:47 +0000 (16:19 -0700)
commit19b2211ef468080e54c440a56ff05922fb618fb3
tree792d135afe30d6af87d38ff5a8eb010d39c86053
parentbe687317b04f7369b13282623ce44b31055f85f1
USB: xhci: unsigned char never equals -1

There were some places that compared port_speed == -1 where port_speed
is a u8.  This doesn't work unless we cast the -1 to u8.  Some places
did it correctly.

Instead of using -1 directly, I've created a DUPLICATE_ENTRY define
which does the cast and is more descriptive as well.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
drivers/usb/host/xhci-mem.c
drivers/usb/host/xhci-ring.c
drivers/usb/host/xhci.h