From owner-freebsd-sparc64@FreeBSD.ORG Fri Dec 2 15:36:43 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 CE2E81065677; Fri, 2 Dec 2011 15:36:43 +0000 (UTC) (envelope-from c.jayachandran@gmail.com) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id 40F948FC17; Fri, 2 Dec 2011 15:36:42 +0000 (UTC) Received: by wgbdr11 with SMTP id dr11so1377281wgb.31 for ; Fri, 02 Dec 2011 07:36:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=S+yqAU1ZwS3FAfgu5VQNN2RySflGJNC++YZlBzo1Ke8=; b=Yk2lNKWcfrKoJ3L7onmC48cpPhSFIK2tg0qnOCVxvpbX0Q6mgRvvIxCbXCWDcCqsvp qROIXhynwfowqqs1F+8e1yM7uxcOuhkO8wxcjJcvGWYPFtTudALtwXXdw9B2GcIJcJMO OgOhKJe5JOgHO5AXjHYSEwo/bzAHNYsDBIv3g= MIME-Version: 1.0 Received: by 10.216.134.96 with SMTP id r74mr619254wei.43.1322840202166; Fri, 02 Dec 2011 07:36:42 -0800 (PST) Sender: c.jayachandran@gmail.com Received: by 10.216.20.67 with HTTP; Fri, 2 Dec 2011 07:36:42 -0800 (PST) In-Reply-To: References: Date: Fri, 2 Dec 2011 21:06:42 +0530 X-Google-Sender-Auth: namLLvuuFaxk5KJ1_rn3dgtuVO4 Message-ID: From: "Jayachandran C." To: freebsd-sparc64@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: marius@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:36:43 -0000 On Fri, Dec 2, 2011 at 7:05 PM, Jayachandran C. wrot= e: > While going thru the OF_finddevice usage in kernel (to fix up the FDT > interface) I noticed that =A0a 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. =A0The 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. Thanks, JC.