From 51cb9d2abfd6110883e29856367c6b81a1f63266 Mon Sep 17 00:00:00 2001 From: deraadt Date: Wed, 31 Jan 1996 04:54:43 +0000 Subject: [PATCH] do not worry about mapdev retval --- sys/arch/sparc/sparc/auxreg.c | 8 +++----- sys/arch/sparc/sparc/clock.c | 17 +++++++++-------- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/sys/arch/sparc/sparc/auxreg.c b/sys/arch/sparc/sparc/auxreg.c index c61ab16f1d7..0b40f13f5ea 100644 --- a/sys/arch/sparc/sparc/auxreg.c +++ b/sys/arch/sparc/sparc/auxreg.c @@ -1,4 +1,4 @@ -/* $NetBSD: auxreg.c,v 1.8 1995/02/22 21:13:01 pk Exp $ */ +/* $NetBSD: auxreg.c,v 1.9 1995/12/11 12:45:16 pk Exp $ */ /* * Copyright (c) 1992, 1993 @@ -106,10 +106,8 @@ auxregattach(parent, self, aux) struct confargs *ca = aux; struct romaux *ra = &ca->ca_ra; - auxio_reg = mapdev(ra->ra_reg, AUXREG_VA, 0, sizeof(long), - ca->ca_bustype); - if ((u_long)auxio_reg != AUXREG_VA) - panic("unable to map auxreg"); + (void)mapdev(ra->ra_reg, AUXREG_VA, 0, sizeof(long), ca->ca_bustype); + auxio_reg = AUXIO_REG; printf("\n"); #ifdef BLINK blink((caddr_t)0); diff --git a/sys/arch/sparc/sparc/clock.c b/sys/arch/sparc/sparc/clock.c index 0993fa4e160..a65d097ba43 100644 --- a/sys/arch/sparc/sparc/clock.c +++ b/sys/arch/sparc/sparc/clock.c @@ -1,4 +1,4 @@ -/* $NetBSD: clock.c,v 1.25 1995/10/08 11:44:59 pk Exp $ */ +/* $NetBSD: clock.c,v 1.26 1995/12/11 12:45:18 pk Exp $ */ /* * Copyright (c) 1992, 1993 @@ -204,7 +204,7 @@ oclockattach(parent, self, aux) printf("\n"); i7 = (volatile struct intersil7170 *) mapiodev(ra->ra_reg, 0, - sizeof(*i7), ca->ca_bustype); + sizeof(*i7), ca->ca_bustype); idp = &idprom; h = idp->id_machine << 24; @@ -258,7 +258,7 @@ eeprom_attach(parent, self, aux) printf("\n"); - eeprom_va = (char *)mapiodev(ra->ra_reg, 0, sizeof(struct eeprom), + eeprom_va = (char *)mapiodev(ra->ra_reg, 0, EEPROM_SIZE, ca->ca_bustype); eeprom_nvram = 0; @@ -324,8 +324,10 @@ clockattach(parent, self, aux) */ cl = (struct clockreg *)mapiodev(ra->ra_reg, 0, 2 * NBPG, ca->ca_bustype); - pmap_changeprot(pmap_kernel(), (vm_offset_t)cl, VM_PROT_READ, 1); - pmap_changeprot(pmap_kernel(), (vm_offset_t)cl + NBPG, VM_PROT_READ, 1); + pmap_changeprot(pmap_kernel(), (vm_offset_t)cl, + VM_PROT_READ, 1); + pmap_changeprot(pmap_kernel(), (vm_offset_t)cl + NBPG, + VM_PROT_READ, 1); cl = (struct clockreg *)((int)cl + CLK_MK48T08_OFF); } else { /* @@ -391,9 +393,8 @@ timerattach(parent, self, aux) * we have a fixed virtual address for the timer, to make * microtime() faster. */ - if ((int)mapdev(ra->ra_reg, TIMERREG_VA, 0, sizeof(struct timerreg), - ca->ca_bustype) != TIMERREG_VA) - panic("unable to map timer"); + (void)mapdev(ra->ra_reg, TIMERREG_VA, 0, sizeof(struct timerreg), + ca->ca_bustype); timerok = 1; /* should link interrupt handlers here, rather than compiled-in? */ } -- 2.20.1