public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Signdness issue in drivers/usb/gadget/ether.c
@ 2006-08-20 18:44 Eric Sesterhenn
  0 siblings, 0 replies; only message in thread
From: Eric Sesterhenn @ 2006-08-20 18:44 UTC (permalink / raw)
  To: linux-kernel

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 */



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-08-20 18:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-20 18:44 [PATCH] Signdness issue in drivers/usb/gadget/ether.c Eric Sesterhenn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox