staging: usbip: fix sparse warnings regarding endianness
authorTeodora Baluta <teobaluta@gmail.com>
Mon, 4 Nov 2013 11:12:12 +0000 (13:12 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 10 Nov 2013 19:51:53 +0000 (11:51 -0800)
commitd0306a514da25976fde942d21f85b12384dd4c1f
treec4faa96ab84de3debbe1fea6419d1fd276f79164
parentb482da2b98a3a716d823995b0678405ff398c0c3
staging: usbip: fix sparse warnings regarding endianness

The wHubCharacteristics field in usb_hub_descriptor structure is __le16
so there is no need for cast. The cpu_to_le16 returns a __le16 type for
a u16 type. Used cpu_to_le16 to silence last sparse error.

drivers/staging/usbip/vhci_hcd.c:223:35: warning: incorrect type in assignment (different base types)
drivers/staging/usbip/vhci_hcd.c:223:35:    expected restricted __le16 [usertype] wHubCharacteristics
drivers/staging/usbip/vhci_hcd.c:223:35:    got unsigned short [unsigned] [usertype] <noident>
drivers/staging/usbip/vhci_hcd.c:351:34: warning: incorrect type in assignment (different base types)
drivers/staging/usbip/vhci_hcd.c:351:34:    expected unsigned short [unsigned] [short] [usertype] <noident>
drivers/staging/usbip/vhci_hcd.c:351:34:    got restricted __le16 [usertype] <noident>
drivers/staging/usbip/vhci_hcd.c:352:34: warning: incorrect type in assignment (different base types)
drivers/staging/usbip/vhci_hcd.c:352:34:    expected unsigned short [unsigned] [short] [usertype] <noident>
drivers/staging/usbip/vhci_hcd.c:352:34:    got restricted __le16 [usertype] <noident>
drivers/staging/usbip/vhci_hcd.c:540:36: warning: restricted __le16 degrades to integer

Signed-off-by: Teodora Baluta <teobaluta@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/usbip/vhci_hcd.c