From owner-freebsd-current@FreeBSD.ORG Thu Feb 26 16:54:53 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BDA6B10656CA for ; Thu, 26 Feb 2009 16:54:53 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from pele.citylink.co.nz (pele.citylink.co.nz [202.8.44.226]) by mx1.freebsd.org (Postfix) with ESMTP id 821E58FC17 for ; Thu, 26 Feb 2009 16:54:53 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from localhost (localhost [127.0.0.1]) by pele.citylink.co.nz (Postfix) with ESMTP id DAFC1FF6F; Fri, 27 Feb 2009 05:54:52 +1300 (NZDT) X-Virus-Scanned: Debian amavisd-new at citylink.co.nz Received: from pele.citylink.co.nz ([127.0.0.1]) by localhost (pele.citylink.co.nz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id U+i1-TS+EX8Y; Fri, 27 Feb 2009 05:54:48 +1300 (NZDT) Received: from citylink.fud.org.nz (unknown [202.8.44.45]) by pele.citylink.co.nz (Postfix) with ESMTP; Fri, 27 Feb 2009 05:54:48 +1300 (NZDT) Received: by citylink.fud.org.nz (Postfix, from userid 1001) id 0367C1142F; Fri, 27 Feb 2009 05:54:47 +1300 (NZDT) Date: Thu, 26 Feb 2009 08:54:47 -0800 From: Andrew Thompson To: Hans Petter Selasky Message-ID: <20090226165447.GA47932@citylink.fud.org.nz> References: <20090226020330.GC25211@citylink.fud.org.nz> <200902260948.31967.hselasky@c2i.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200902260948.31967.hselasky@c2i.net> User-Agent: Mutt/1.5.17 (2007-11-01) Cc: freebsd-current@freebsd.org Subject: Re: USB devfs patch X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Feb 2009 16:54:54 -0000 On Thu, Feb 26, 2009 at 09:48:31AM +0100, Hans Petter Selasky wrote: > On Thursday 26 February 2009, Andrew Thompson wrote: > > http://people.freebsd.org/~thompsa/usb-cdevs.diff > > Hi, > > Here is a list of comments and bugs. > The comments follow the diff from top to bottom. Thanks Hans, I will go through them all. > 6) Some non-gcc compilers will complain unless you do 0-1 when the > destination variable is unsigned. > > - usb2_free_pipe_data(udev, iface_index, 0 - 1); > + usb2_free_pipe_data(udev, iface_index, -1); This one in particular, if the variable is unsigned then you shouldnt be passing a negative value. Either make signed or use ~0 for the max value. cheers, Andrew