netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] net: cdc_ether: silence sparse __CHECK_ENDIAN__ warning
@ 2013-04-17  8:12 Bjørn Mork
  2013-04-17  8:52 ` Ming Lei
  2013-04-17 18:15 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Bjørn Mork @ 2013-04-17  8:12 UTC (permalink / raw)
  To: netdev; +Cc: Bjørn Mork, Ming Lei

Remove warning introduced by commit 418fc57 ("usbnet: cdc-ether: apply
usbnet_link_change"):

   CHECK   .../drivers/net/usb/cdc_ether.c
 .../drivers/net/usb/cdc_ether.c:409:46: warning: incorrect type in argument 2 (different base types)
 .../drivers/net/usb/cdc_ether.c:409:46:    expected bool [unsigned] [usertype] <noident>
 .../drivers/net/usb/cdc_ether.c:409:46:    got restricted __le16 [usertype] wValue

Cc: Ming Lei <ming.lei@canonical.com>
Signed-off-by: Bjørn Mork <bjorn@mork.no>
---
 drivers/net/usb/cdc_ether.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/usb/cdc_ether.c b/drivers/net/usb/cdc_ether.c
index e965806..4ff71d6 100644
--- a/drivers/net/usb/cdc_ether.c
+++ b/drivers/net/usb/cdc_ether.c
@@ -406,7 +406,7 @@ void usbnet_cdc_status(struct usbnet *dev, struct urb *urb)
 	case USB_CDC_NOTIFY_NETWORK_CONNECTION:
 		netif_dbg(dev, timer, dev->net, "CDC: carrier %s\n",
 			  event->wValue ? "on" : "off");
-		usbnet_link_change(dev, event->wValue, 0);
+		usbnet_link_change(dev, !!event->wValue, 0);
 		break;
 	case USB_CDC_NOTIFY_SPEED_CHANGE:	/* tx/rx rates */
 		netif_dbg(dev, timer, dev->net, "CDC: speed change (len %d)\n",
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-04-17 18:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-17  8:12 [PATCH net-next] net: cdc_ether: silence sparse __CHECK_ENDIAN__ warning Bjørn Mork
2013-04-17  8:52 ` Ming Lei
2013-04-17 18:15 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).