From owner-freebsd-sparc64@FreeBSD.ORG Fri Dec 2 15:58:10 2011 Return-Path: Delivered-To: freebsd-sparc64@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CF681106564A for ; Fri, 2 Dec 2011 15:58:10 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (alchemy.franken.de [194.94.249.214]) by mx1.freebsd.org (Postfix) with ESMTP id 68CF68FC0C for ; Fri, 2 Dec 2011 15:58:10 +0000 (UTC) Received: from alchemy.franken.de (localhost [127.0.0.1]) by alchemy.franken.de (8.14.4/8.14.4/ALCHEMY.FRANKEN.DE) with ESMTP id pB2Fw6d5072412; Fri, 2 Dec 2011 16:58:09 +0100 (CET) (envelope-from marius@alchemy.franken.de) Received: (from marius@localhost) by alchemy.franken.de (8.14.4/8.14.4/Submit) id pB2Fw6bY072411; Fri, 2 Dec 2011 16:58:06 +0100 (CET) (envelope-from marius) Date: Fri, 2 Dec 2011 16:58:06 +0100 From: Marius Strobl To: "Jayachandran C." Message-ID: <20111202155805.GB60194@alchemy.franken.de> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i Cc: freebsd-sparc64@freebsd.org Subject: Re: [PATCH] fix OF_finddevice return value checks on sparc64 X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Dec 2011 15:58:10 -0000 On Fri, Dec 02, 2011 at 09:06:42PM +0530, Jayachandran C. wrote: > On Fri, Dec 2, 2011 at 7:05 PM, Jayachandran C. wrote: > > While going thru the OF_finddevice usage in kernel (to fix up the FDT > > interface) I noticed that ?a few calls made to OF_finddevice in > > sparc64 does not check the return value correctly. > > > > The error return is -1 not 0, and since the value is unsigned, > > checking it for '< 0' does not work either. ?The attached patch fixes > > this. > > I had not planned to commit this yet, but it has gone in with the > related changes in r228201. Let me know if there are any objections - > I can revert or check in further changes if needed. > It's okay. It would be nice if you could MFC these changes down to stable/8 once stable/9 is open again. Marius