From owner-freebsd-current Tue Feb 25 13:45:39 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 55D2537B401; Tue, 25 Feb 2003 13:45:37 -0800 (PST) Received: from brev.stud.ntnu.no (brev.stud.ntnu.no [129.241.56.70]) by mx1.FreeBSD.org (Postfix) with ESMTP id C229F43FAF; Tue, 25 Feb 2003 13:45:33 -0800 (PST) (envelope-from morten@rodal.no) Received: from localhost (localhost [127.0.0.1]) by brev.stud.ntnu.no (Postfix) with ESMTP id D520713F051; Tue, 25 Feb 2003 22:45:31 +0100 (CET) Received: from atlantis.rodal.no (m227h.studby.ntnu.no [129.241.135.227]) by brev.stud.ntnu.no (Postfix) with ESMTP id AACCA13F005; Tue, 25 Feb 2003 22:45:30 +0100 (CET) Received: (from morten@localhost) by atlantis.rodal.no (8.12.7/8.12.7/Submit) id h1PLjUbc025026; Tue, 25 Feb 2003 22:45:30 +0100 (CET) (envelope-from morten) Date: Tue, 25 Feb 2003 22:45:29 +0100 From: Morten Rodal To: Maxime Henrion Cc: current@FreeBSD.ORG Subject: Re: patch for the nVidia driver and -CURRENT Message-ID: <20030225214529.GA19651@slurp.rodal.no> References: <20030225182809.GA18565@elvis.mu.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="pWyiEgJYm5f9v55/" Content-Disposition: inline In-Reply-To: <20030225182809.GA18565@elvis.mu.org> X-Virus-Scanned: by AMaViS perl-11 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 --pWyiEgJYm5f9v55/ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 >=3D at->address && > offset < at->address + at->size) > - return atop(vtophys(offset)); > + *paddr =3D vtophys(offset); > + return 0; > } > =20 > 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. --=20 Morten Rodal --pWyiEgJYm5f9v55/ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (FreeBSD) iD8DBQE+W+P5bWe1Cy11WVsRAvzoAJwJUf9BZnYo8HAA7LekTW1qZXNxKwCgwuZk orchQZABzmFrN3PhNy12ZHE= =hKyn -----END PGP SIGNATURE----- --pWyiEgJYm5f9v55/-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message