Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-2]: src/sys/arch/mac68k/dev Revert previous change, which was acc...



details:   https://anonhg.NetBSD.org/src/rev/31da4e38a9c2
branches:  netbsd-2
changeset: 564428:31da4e38a9c2
user:      snj <snj%NetBSD.org@localhost>
date:      Thu Mar 09 00:28:17 2006 +0000

description:
Revert previous change, which was accidentally committed to the wrong branch.

diffstat:

 sys/arch/mac68k/dev/grf_compat.c |  13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diffs (35 lines):

diff -r dd995665f33c -r 31da4e38a9c2 sys/arch/mac68k/dev/grf_compat.c
--- a/sys/arch/mac68k/dev/grf_compat.c  Wed Mar 08 23:25:04 2006 +0000
+++ b/sys/arch/mac68k/dev/grf_compat.c  Thu Mar 09 00:28:17 2006 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: grf_compat.c,v 1.13.6.1 2006/03/08 23:25:04 scottr Exp $       */
+/*     $NetBSD: grf_compat.c,v 1.13.6.2 2006/03/09 00:28:17 snj Exp $  */
 
 /*
  * Copyright (C) 1999 Scott Reynolds
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: grf_compat.c,v 1.13.6.1 2006/03/08 23:25:04 scottr Exp $");
+__KERNEL_RCSID(0, "$NetBSD: grf_compat.c,v 1.13.6.2 2006/03/09 00:28:17 snj Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -324,10 +324,13 @@
 
        dc = sc->mfb_sc->sc_dc;
 
-       if ((u_int)off < m68k_round_page(dc->dc_offset + dc->dc_size))
-               return m68k_btop(dc->dc_paddr + off);
+       if (off >= 0 &&
+           off < m68k_round_page(dc->dc_offset + dc->dc_size))
+               addr = m68k_btop(dc->dc_paddr + off);
+       else
+               addr = (-1);    /* XXX bogus */
 
-       return (-1);
+       return addr;
 }
 
 int



Home | Main Index | Thread Index | Old Index