lkml.org 
[lkml]   [2006]   [Aug]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH] Signdness issue in drivers/usb/gadget/ether.c
From
Date
hi,

another gcc 4.1 signdness warning:

drivers/usb/gadget/ether.c:2028: warning: comparison of unsigned expression < 0 is always false

length is assigned the value of usb_ep_queue() which returns an int. Directly
after this it is checked for < 0, which can never be true. Making length an
int makes the error check work again.

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>

--- linux-2.6.18-rc4/drivers/usb/gadget/ether.c.orig 2006-08-20 20:40:20.000000000 +0200
+++ linux-2.6.18-rc4/drivers/usb/gadget/ether.c 2006-08-20 20:40:37.000000000 +0200
@@ -1998,7 +1998,7 @@ rndis_control_ack_complete (struct usb_e
static int rndis_control_ack (struct net_device *net)
{
struct eth_dev *dev = netdev_priv(net);
- u32 length;
+ int length;
struct usb_request *resp = dev->stat_req;

/* in case RNDIS calls this after disconnect */

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-08-20 20:47    [W:0.030 / U:0.156 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site