[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1351237449-23643-2-git-send-email-bjorn@mork.no>
Date: Fri, 26 Oct 2012 09:44:08 +0200
From: Bjørn Mork <bjorn@...k.no>
To: netdev@...r.kernel.org
Cc: linux-usb@...r.kernel.org, Oliver Neukum <oliver@...kum.org>,
Bjørn Mork <bjorn@...k.no>
Subject: [PATCH net-next] net: cdc_ncm: big endian fix
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@...k.no>
---
drivers/net/usb/cdc_ncm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/usb/cdc_ncm.c b/drivers/net/usb/cdc_ncm.c
index 0ed03b1..682b17a 100644
--- a/drivers/net/usb/cdc_ncm.c
+++ b/drivers/net/usb/cdc_ncm.c
@@ -1087,7 +1087,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",
--
1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists