Skip to content

Commit

Permalink
net: cdc_ncm: big endian fix
Browse files Browse the repository at this point in the history
Probably doesn't matter much since the value is used as a
boolean anyway, but it removes the sparse warning:

 drivers/net/usb/cdc_ncm.c:1090:32: warning: incorrect type in assignment (different base types)
 drivers/net/usb/cdc_ncm.c:1090:32:    expected unsigned short [unsigned] [usertype] connected
 drivers/net/usb/cdc_ncm.c:1090:32:    got restricted __le16 [usertype] wValue

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Bjørn Mork authored and David S. Miller committed Oct 28, 2012
1 parent 9e55111 commit 1a7c6cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/usb/cdc_ncm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1064,7 +1064,7 @@ static void cdc_ncm_status(struct usbnet *dev, struct urb *urb)
* USB_CDC_NOTIFY_NETWORK_CONNECTION notification shall be
* sent by device after USB_CDC_NOTIFY_SPEED_CHANGE.
*/
ctx->connected = event->wValue;
ctx->connected = le16_to_cpu(event->wValue);

printk(KERN_INFO KBUILD_MODNAME ": %s: network connection:"
" %sconnected\n",
Expand Down

0 comments on commit 1a7c6cc

Please sign in to comment.