From owner-freebsd-current Tue Feb 25 21:11:16 2003 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 00D3E37B401; Tue, 25 Feb 2003 21:11:15 -0800 (PST) Received: from k6.locore.ca (k6.locore.ca [198.96.117.170]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2A77943FAF; Tue, 25 Feb 2003 21:11:14 -0800 (PST) (envelope-from jake@k6.locore.ca) Received: from k6.locore.ca (jake@localhost.locore.ca [127.0.0.1]) by k6.locore.ca (8.12.6/8.12.6) with ESMTP id h1Q5FkNk042347; Wed, 26 Feb 2003 00:15:46 -0500 (EST) (envelope-from jake@k6.locore.ca) Received: (from jake@localhost) by k6.locore.ca (8.12.6/8.12.6/Submit) id h1Q5FgEI042346; Wed, 26 Feb 2003 00:15:42 -0500 (EST) Date: Wed, 26 Feb 2003 00:15:42 -0500 From: Jake Burkholder To: Maxime Henrion Cc: Morten Rodal , current@FreeBSD.ORG Subject: Re: patch for the nVidia driver and -CURRENT Message-ID: <20030226001542.A42311@locore.ca> References: <20030225182809.GA18565@elvis.mu.org> <20030225214529.GA19651@slurp.rodal.no> <20030225214916.GC18565@elvis.mu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20030225214916.GC18565@elvis.mu.org>; from mux@FreeBSD.ORG on Tue, Feb 25, 2003 at 10:49:16PM +0100 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Apparently, On Tue, Feb 25, 2003 at 10:49:16PM +0100, Maxime Henrion said words to the effect of; > Morten Rodal wrote: > > On Tue, Feb 25, 2003 at 07:28:09PM +0100, Maxime Henrion wrote: > > [snip a lot of the patch] > > > @@ -1431,7 +1442,8 @@ > > > SLIST_FOREACH(at, &sc->alloc_list, list) { > > > if (offset >= at->address && > > > offset < at->address + at->size) > > > - return atop(vtophys(offset)); > > > + *paddr = vtophys(offset); > > > + return 0; > > > } > > > > > > return -1; > > > > Should the function return 0 even if the if (offset..) fails? I have > > no clue about the nvidia kernel driver (or kernel stuff at all) but it > > seems to me that the only way the function can return -1 is if the > > list is empty. > > And this is consistant with what the code was doing before. This change > is not a functional change, it's just a necessary update due to API > changes. I think he's referring to missing braces around the if which was changed from 1 statement to 2. Jake To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message