From 02248ff9a06965f6ae45bdcdbc8e7bcd8ced1c0c Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Tue, 10 Aug 2004 19:16:19 +0000 Subject: spacing --- sys/arch/sgi/dev/if_mec.c | 8 ++++---- sys/arch/sgi/dev/lpt_lbus.c | 26 ++++++++++++------------ sys/arch/sgi/include/autoconf.h | 32 ++++++++++++++--------------- sys/arch/sgi/include/bus.h | 12 +++++------ sys/arch/sgi/include/disklabel.h | 4 ++-- sys/arch/sgi/include/intr.h | 34 +++++++++++++++---------------- sys/arch/sgi/include/pte.h | 2 +- sys/arch/sgi/localbus/com_lbus.c | 12 +++++------ sys/arch/sgi/localbus/crimebus.h | 2 +- sys/arch/sgi/localbus/macebus.c | 32 ++++++++++++++--------------- sys/arch/sgi/localbus/macebus.h | 4 ++-- sys/arch/sgi/localbus/macectrl.S | 4 ++-- sys/arch/sgi/pci/macepcibridge.c | 42 +++++++++++++++++++-------------------- sys/arch/sgi/pci/macepcibrvar.h | 4 ++-- sys/arch/sgi/pci/pci_machdep.h | 4 ++-- sys/arch/sgi/pci/pciide_machdep.c | 4 ++-- sys/arch/sgi/sgi/autoconf.c | 13 ++++++------ sys/arch/sgi/sgi/genassym.cf | 4 ++-- sys/arch/sgi/sgi/locore.S | 4 ++-- sys/arch/sgi/sgi/machdep.c | 20 +++++++++---------- 20 files changed, 132 insertions(+), 135 deletions(-) (limited to 'sys') diff --git a/sys/arch/sgi/dev/if_mec.c b/sys/arch/sgi/dev/if_mec.c index ec7471cbeef..50ad9322d7d 100644 --- a/sys/arch/sgi/dev/if_mec.c +++ b/sys/arch/sgi/dev/if_mec.c @@ -1,5 +1,5 @@ -/* $OpenBSD: if_mec.c,v 1.2 2004/08/10 13:47:45 pefo Exp $ */ -/* $NetBSD: if_mec_mace.c,v 1.5 2004/08/01 06:36:36 tsutsui Exp $ */ +/* $OpenBSD: if_mec.c,v 1.3 2004/08/10 19:16:17 deraadt Exp $ */ +/* $NetBSD: if_mec_mace.c,v 1.5 2004/08/01 06:36:36 tsutsui Exp $ */ /* * Copyright (c) 2004 Izumi Tsutsui. @@ -944,7 +944,7 @@ mec_start(struct ifnet *ifp) /* but also set TXINT bit on a half of TXDESC */ if (sc->sc_txpending == (MEC_NTXDESC / 2)) txd->txd_cmd |= MEC_TXCMD_TXINT; - + if (txs->txs_flags & MEC_TXS_TXDBUF) txd->txd_cmd |= TXCMD_BUFSTART(MEC_TXDESCSIZE - buflen); if (txs->txs_flags & MEC_TXS_TXDPTR1) { @@ -993,7 +993,7 @@ mec_start(struct ifnet *ifp) sc->sc_txdesc[sc->sc_txlast].txd_cmd |= MEC_TXCMD_TXINT; MEC_TXCMDSYNC(sc, sc->sc_txlast, BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE); - + /* start TX */ bus_space_write_8(st, sh, MEC_TX_RING_PTR, MEC_NEXTTX(sc->sc_txlast)); diff --git a/sys/arch/sgi/dev/lpt_lbus.c b/sys/arch/sgi/dev/lpt_lbus.c index 4e52108f604..5f195203d7b 100644 --- a/sys/arch/sgi/dev/lpt_lbus.c +++ b/sys/arch/sgi/dev/lpt_lbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lpt_lbus.c,v 1.2 2004/08/07 10:30:01 pefo Exp $ */ +/* $OpenBSD: lpt_lbus.c,v 1.3 2004/08/10 19:16:18 deraadt Exp $ */ /* * Copyright (c) 1993, 1994 Charles Hannum. @@ -15,25 +15,25 @@ * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: - * This software is a component of "386BSD" developed by + * This software is a component of "386BSD" developed by * William F. Jolitz, TeleMuse. * 4. Neither the name of the developer nor the name "386BSD" * may be used to endorse or promote products derived from this software * without specific prior written permission. * - * THIS SOFTWARE IS A COMPONENT OF 386BSD DEVELOPED BY WILLIAM F. JOLITZ - * AND IS INTENDED FOR RESEARCH AND EDUCATIONAL PURPOSES ONLY. THIS - * SOFTWARE SHOULD NOT BE CONSIDERED TO BE A COMMERCIAL PRODUCT. - * THE DEVELOPER URGES THAT USERS WHO REQUIRE A COMMERCIAL PRODUCT + * THIS SOFTWARE IS A COMPONENT OF 386BSD DEVELOPED BY WILLIAM F. JOLITZ + * AND IS INTENDED FOR RESEARCH AND EDUCATIONAL PURPOSES ONLY. THIS + * SOFTWARE SHOULD NOT BE CONSIDERED TO BE A COMMERCIAL PRODUCT. + * THE DEVELOPER URGES THAT USERS WHO REQUIRE A COMMERCIAL PRODUCT * NOT MAKE USE OF THIS WORK. * * FOR USERS WHO WISH TO UNDERSTAND THE 386BSD SYSTEM DEVELOPED - * BY WILLIAM F. JOLITZ, WE RECOMMEND THE USER STUDY WRITTEN - * REFERENCES SUCH AS THE "PORTING UNIX TO THE 386" SERIES - * (BEGINNING JANUARY 1991 "DR. DOBBS JOURNAL", USA AND BEGINNING - * JUNE 1991 "UNIX MAGAZIN", GERMANY) BY WILLIAM F. JOLITZ AND - * LYNNE GREER JOLITZ, AS WELL AS OTHER BOOKS ON UNIX AND THE - * ON-LINE 386BSD USER MANUAL BEFORE USE. A BOOK DISCUSSING THE INTERNALS + * BY WILLIAM F. JOLITZ, WE RECOMMEND THE USER STUDY WRITTEN + * REFERENCES SUCH AS THE "PORTING UNIX TO THE 386" SERIES + * (BEGINNING JANUARY 1991 "DR. DOBBS JOURNAL", USA AND BEGINNING + * JUNE 1991 "UNIX MAGAZIN", GERMANY) BY WILLIAM F. JOLITZ AND + * LYNNE GREER JOLITZ, AS WELL AS OTHER BOOKS ON UNIX AND THE + * ON-LINE 386BSD USER MANUAL BEFORE USE. A BOOK DISCUSSING THE INTERNALS * OF 386BSD ENTITLED "386BSD FROM THE INSIDE OUT" WILL BE AVAILABLE LATE 1992. * * THIS SOFTWARE IS PROVIDED BY THE DEVELOPER ``AS IS'' AND @@ -98,7 +98,7 @@ lpt_localbus_probe(parent, match, aux) #define ABORT return 0 #endif - if(!BUS_MATCHNAME(ca, "lpt")) + if (!BUS_MATCHNAME(ca, "lpt")) return(0); /*XXX need to check where to pick up iotag when porting this */ diff --git a/sys/arch/sgi/include/autoconf.h b/sys/arch/sgi/include/autoconf.h index 9e626c453b3..f7a734a5eea 100644 --- a/sys/arch/sgi/include/autoconf.h +++ b/sys/arch/sgi/include/autoconf.h @@ -1,4 +1,4 @@ -/* $OpenBSD: autoconf.h,v 1.5 2004/08/10 18:52:58 deraadt Exp $ */ +/* $OpenBSD: autoconf.h,v 1.6 2004/08/10 19:16:18 deraadt Exp $ */ /* * Copyright (c) 2001-2003 Opsycon AB (www.opsycon.se / www.opsycon.com) @@ -46,7 +46,7 @@ #define MAX_CPUS 4 struct sys_rec { - int system_type; + int system_type; struct { u_int16_t type; u_int8_t vers_maj; @@ -61,16 +61,16 @@ struct sys_rec { u_int32_t cfg_reg; u_int32_t stat_reg; } cpu[MAX_CPUS]; - struct mips_bus_space local; - struct mips_bus_space isa_io; - struct mips_bus_space isa_mem; - struct mips_bus_space pci_io[2]; - struct mips_bus_space pci_mem[2]; - - int cons_baudclk; - struct mips_bus_space console_io; /* for stupid map designs */ + struct mips_bus_space local; + struct mips_bus_space isa_io; + struct mips_bus_space isa_mem; + struct mips_bus_space pci_io[2]; + struct mips_bus_space pci_mem[2]; + + int cons_baudclk; + struct mips_bus_space console_io; /* for stupid map designs */ struct mips_bus_space *cons_iot; - bus_addr_t cons_ioaddr[8]; /* up to eight loclbus tty's */ + bus_addr_t cons_ioaddr[8]; /* up to eight loclbus tty's */ }; extern struct sys_rec sys_config; @@ -107,13 +107,13 @@ struct abus { #define BUS_PLCHLDR 4 /* placeholder */ #define BUS_PCIBR 5 /* PCI bridge Bus */ -#define BUS_INTR_ESTABLISH(ca, a, b, c, d, e, f, h) \ +#define BUS_INTR_ESTABLISH(ca, a, b, c, d, e, f, h) \ (*(ca)->ca_bus->ab_intr_establish)((a),(b),(c),(d),(e),(f),(h)) -#define BUS_INTR_DISESTABLISH(ca) \ +#define BUS_INTR_DISESTABLISH(ca) \ (*(ca)->ca_bus->ab_intr_establish)(ca) -#define BUS_MATCHNAME(ca, name) \ - (((ca)->ca_bus->ab_matchname) ? \ - (*(ca)->ca_bus->ab_matchname)((ca), (name)) : \ +#define BUS_MATCHNAME(ca, name) \ + (((ca)->ca_bus->ab_matchname) ? \ + (*(ca)->ca_bus->ab_matchname)((ca), (name)) : \ -1) struct confargs { diff --git a/sys/arch/sgi/include/bus.h b/sys/arch/sgi/include/bus.h index 2b8f6f45aff..f361369cb23 100644 --- a/sys/arch/sgi/include/bus.h +++ b/sys/arch/sgi/include/bus.h @@ -1,4 +1,4 @@ -/* $OpenBSD: bus.h,v 1.2 2004/08/10 18:52:58 deraadt Exp $ */ +/* $OpenBSD: bus.h,v 1.3 2004/08/10 19:16:18 deraadt Exp $ */ /* * Copyright (c) 2003-2004 Opsycon AB Sweden. All rights reserved. @@ -262,8 +262,8 @@ bus_space_copy_4(void *v, bus_space_handle_t h1, bus_size_t o1, #define BUS_SPACE_BARRIER_READ 0x01 /* force read barrier */ #define BUS_SPACE_BARRIER_WRITE 0x02 /* force write barrier */ /* Compatibility defines */ -#define BUS_BARRIER_READ BUS_SPACE_BARRIER_READ -#define BUS_BARRIER_WRITE BUS_SPACE_BARRIER_WRITE +#define BUS_BARRIER_READ BUS_SPACE_BARRIER_READ +#define BUS_BARRIER_WRITE BUS_SPACE_BARRIER_WRITE #define BUS_DMA_WAITOK 0x00 @@ -275,9 +275,9 @@ bus_space_copy_4(void *v, bus_space_handle_t h1, bus_size_t o1, #define BUS_DMA_BUS2 0x20 #define BUS_DMA_BUS3 0x40 #define BUS_DMA_BUS4 0x80 -#define BUS_DMA_READ 0x100 /* mapping is device -> memory only */ -#define BUS_DMA_WRITE 0x200 /* mapping is memory -> device only */ -#define BUS_DMA_STREAMING 0x400 /* hint: sequential, unidirectional */ +#define BUS_DMA_READ 0x100 /* mapping is device -> memory only */ +#define BUS_DMA_WRITE 0x200 /* mapping is memory -> device only */ +#define BUS_DMA_STREAMING 0x400 /* hint: sequential, unidirectional */ /* Forwards needed by prototypes below. */ struct mbuf; diff --git a/sys/arch/sgi/include/disklabel.h b/sys/arch/sgi/include/disklabel.h index 8e56377a893..97c8cea5de2 100644 --- a/sys/arch/sgi/include/disklabel.h +++ b/sys/arch/sgi/include/disklabel.h @@ -1,4 +1,4 @@ -/* $OpenBSD: disklabel.h,v 1.1 2004/08/06 21:12:19 pefo Exp $ */ +/* $OpenBSD: disklabel.h,v 1.2 2004/08/10 19:16:18 deraadt Exp $ */ /* $NetBSD: disklabel.h,v 1.3 1996/03/09 20:52:54 ghudson Exp $ */ /* @@ -15,7 +15,7 @@ * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: - * This product includes software developed by Christopher G. Demetriou. + * This product includes software developed by Christopher G. Demetriou. * 4. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission * diff --git a/sys/arch/sgi/include/intr.h b/sys/arch/sgi/include/intr.h index 26e8fb95232..94a93eee758 100644 --- a/sys/arch/sgi/include/intr.h +++ b/sys/arch/sgi/include/intr.h @@ -1,4 +1,4 @@ -/* $OpenBSD: intr.h,v 1.2 2004/08/10 18:52:58 deraadt Exp $ */ +/* $OpenBSD: intr.h,v 1.3 2004/08/10 19:16:18 deraadt Exp $ */ /* * Copyright (c) 2001-2004 Opsycon AB (www.opsycon.se / www.opsycon.com) @@ -172,16 +172,16 @@ splraise(int newcpl) oldcpl = cpl; cpl = oldcpl | newcpl; __asm__ (" sync\n .set reorder\n"); - return(oldcpl); + return (oldcpl); } static __inline void splx(int newcpl) { cpl = newcpl; - if((ipending & ~newcpl) && (pending_hand != NULL)) { - (*pending_hand)(); - } + if ((ipending & ~newcpl) && (pending_hand != NULL)) { + (*pending_hand)(); + } } static __inline int @@ -191,10 +191,10 @@ spllower(int newcpl) oldcpl = cpl; cpl = newcpl; - if((ipending & ~newcpl) && (pending_hand != NULL)) { - (*pending_hand)(); + if ((ipending & ~newcpl) && (pending_hand != NULL)) { + (*pending_hand)(); } - return(oldcpl); + return (oldcpl); } /* @@ -208,13 +208,13 @@ void set_sint(int pending); */ struct intrhand { - struct intrhand *ih_next; - int (*ih_fun)(void *); - void *ih_arg; - u_long ih_count; - int ih_level; - int ih_irq; - char *ih_what; + struct intrhand *ih_next; + int (*ih_fun)(void *); + void *ih_arg; + u_long ih_count; + int ih_level; + int ih_irq; + char *ih_what; void *frame; }; @@ -226,8 +226,8 @@ struct intrhand { struct trap_frame; struct { - intrmask_t int_mask; - intrmask_t (*int_hand)(intrmask_t, struct trap_frame *); + intrmask_t int_mask; + intrmask_t (*int_hand)(intrmask_t, struct trap_frame *); } cpu_int_tab[NLOWINT]; intrmask_t idle_mask; diff --git a/sys/arch/sgi/include/pte.h b/sys/arch/sgi/include/pte.h index 232b8bc709e..e93b8b2ef4c 100644 --- a/sys/arch/sgi/include/pte.h +++ b/sys/arch/sgi/include/pte.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pte.h,v 1.1 2004/08/06 21:12:19 pefo Exp $ */ +/* $OpenBSD: pte.h,v 1.2 2004/08/10 19:16:18 deraadt Exp $ */ /* * Copyright (c) 1988 University of Utah. diff --git a/sys/arch/sgi/localbus/com_lbus.c b/sys/arch/sgi/localbus/com_lbus.c index 3e45d1f8ec2..2e063741c81 100644 --- a/sys/arch/sgi/localbus/com_lbus.c +++ b/sys/arch/sgi/localbus/com_lbus.c @@ -1,8 +1,8 @@ -/* $OpenBSD: com_lbus.c,v 1.1 2004/08/06 21:12:19 pefo Exp $ */ +/* $OpenBSD: com_lbus.c,v 1.2 2004/08/10 19:16:18 deraadt Exp $ */ /* * Copyright (c) 2001-2004 Opsycon AB (www.opsycon.se / www.opsycon.com) - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -75,17 +75,15 @@ com_localbus_probe(parent, match, aux) } iobase = (bus_addr_t)sys_config.cons_ioaddr[cf->cf_unit]; - if(iobase == 0) { + if (iobase == 0) { rv = 0; /* Not present */ - } - else { + } else { iot = sys_config.cons_iot; /* if it's in use as console, it's there. */ if (!(iobase == comconsaddr && !comconsattached)) { bus_space_map(iot, iobase, COM_NPORTS, 0, &ioh); rv = comprobe1(iot, ioh); - } - else { + } else { rv = 1; } } diff --git a/sys/arch/sgi/localbus/crimebus.h b/sys/arch/sgi/localbus/crimebus.h index 23cb9894bab..2c1dd5f5680 100644 --- a/sys/arch/sgi/localbus/crimebus.h +++ b/sys/arch/sgi/localbus/crimebus.h @@ -2,7 +2,7 @@ /* * Copyright (c) 2003-2004 Opsycon AB (www.opsycon.se). - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/sys/arch/sgi/localbus/macebus.c b/sys/arch/sgi/localbus/macebus.c index 69d7cc26ff4..033217c9f35 100644 --- a/sys/arch/sgi/localbus/macebus.c +++ b/sys/arch/sgi/localbus/macebus.c @@ -1,8 +1,8 @@ -/* $OpenBSD: macebus.c,v 1.3 2004/08/10 08:07:35 mickey Exp $ */ +/* $OpenBSD: macebus.c,v 1.4 2004/08/10 19:16:18 deraadt Exp $ */ /* * Copyright (c) 2000-2004 Opsycon AB (www.opsycon.se) - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -46,7 +46,7 @@ #include #include - + #include #include @@ -109,7 +109,7 @@ bus_space_handle_t crime_h; bus_space_handle_t mace_h; struct machine_bus_dma_tag mace_bus_dma_tag = { - NULL, /* _cookie */ + NULL, /* _cookie */ _dmamap_create, _dmamap_destroy, _dmamap_load, @@ -167,13 +167,13 @@ macebusscan(struct device *parent, void *child, void *args) lba.ca_sys = cf->cf_loc[0]; if (cf->cf_loc[1] == -1) { lba.ca_baseaddr = 0; - } else { + } else { lba.ca_baseaddr = cf->cf_loc[1]; } if (cf->cf_loc[2] == -1) { lba.ca_intr = 0; lba.ca_nintr = 0; - } else { + } else { lba.ca_intr= cf->cf_loc[2]; lba.ca_nintr = 1; } @@ -231,7 +231,7 @@ macebusattach(parent, self, aux) bus_space_write_8(&crimebus_tag, crime_h, CRIME_CPU_ERROR_STAT, 0); bus_space_write_8(&crimebus_tag, crime_h, CRIME_MEM_ERROR_STAT, 0); - + mask = 0; bus_space_write_8(&crimebus_tag, crime_h, CRIME_INT_MASK, mask); bus_space_write_8(&crimebus_tag, crime_h, CRIME_INT_SOFT, 0); @@ -290,13 +290,13 @@ macebusattach(parent, self, aux) lba.ca_sys = cf->cf_loc[0]; if (cf->cf_loc[1] == -1) { lba.ca_baseaddr = 0; - } else { + } else { lba.ca_baseaddr = cf->cf_loc[1]; } if (cf->cf_loc[2] == -1) { lba.ca_intr = 0; lba.ca_nintr = 0; - } else { + } else { lba.ca_intr= cf->cf_loc[2]; lba.ca_nintr = 1; } @@ -453,7 +453,7 @@ static int fakeintr(void *a) {return 0;} * interrupt was serviced. * Interrupts are numbered from 1 and up where 1 maps to HW int 0. */ -void * +void * macebus_intr_establish(icp, irq, type, level, ih_fun, ih_arg, ih_what) void *icp; u_long irq; /* XXX pci_intr_handle_t compatible XXX */ @@ -470,12 +470,12 @@ extern int cold; static int initialized = 0; - if(!initialized) { -/*INIT CODE HERE*/ + if (!initialized) { + /*INIT CODE HERE*/ initialized = 1; } - if(irq > 62 || irq < 1) { + if (irq > 62 || irq < 1) { panic("intr_establish: illegal irq %d\n", irq); } irq -= 1; /* Adjust for 1 being first (0 is no int) */ @@ -485,7 +485,7 @@ static int initialized = 0; if (ih == NULL) panic("intr_establish: can't malloc handler info"); - if(type == IST_NONE || type == IST_PULSE) + if (type == IST_NONE || type == IST_PULSE) panic("intr_establish: bogus type"); switch (intrtype[irq]) { @@ -618,7 +618,7 @@ static volatile int processing; /* Don't recurse... */ if (processing) - return; + return; processing = 1; /* XXX interrupt vulnerable when changing ipending */ @@ -638,7 +638,7 @@ static volatile int processing; ih = intrhand[vector]; while (ih) { ih->frame = &cf; - if((*ih->ih_fun)(ih->ih_arg)) { + if ((*ih->ih_fun)(ih->ih_arg)) { ih->ih_count++; } ih = ih->ih_next; diff --git a/sys/arch/sgi/localbus/macebus.h b/sys/arch/sgi/localbus/macebus.h index e3675f3e11b..90ff7a62613 100644 --- a/sys/arch/sgi/localbus/macebus.h +++ b/sys/arch/sgi/localbus/macebus.h @@ -1,8 +1,8 @@ -/* $OpenBSD*/ +/* $OpenBSD: macebus.h,v 1.3 2004/08/10 19:16:18 deraadt Exp $ */ /* * Copyright (c) 2003-2004 Opsycon AB (www.opsycon.com). - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/sys/arch/sgi/localbus/macectrl.S b/sys/arch/sgi/localbus/macectrl.S index 879032928aa..83e6820a8a9 100644 --- a/sys/arch/sgi/localbus/macectrl.S +++ b/sys/arch/sgi/localbus/macectrl.S @@ -1,8 +1,8 @@ -/* $OpenBSD: macectrl.S,v 1.1 2004/08/06 21:12:19 pefo Exp $ */ +/* $OpenBSD: macectrl.S,v 1.2 2004/08/10 19:16:18 deraadt Exp $ */ /* * Copyright (c) 2004 Opsycon AB (www.opsycon.se / www.opsycon.com) - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/sys/arch/sgi/pci/macepcibridge.c b/sys/arch/sgi/pci/macepcibridge.c index aebef17e5f2..fafe5b81817 100644 --- a/sys/arch/sgi/pci/macepcibridge.c +++ b/sys/arch/sgi/pci/macepcibridge.c @@ -1,8 +1,8 @@ -/* $OpenBSD: macepcibridge.c,v 1.1 2004/08/06 21:12:19 pefo Exp $ */ +/* $OpenBSD: macepcibridge.c,v 1.2 2004/08/10 19:16:18 deraadt Exp $ */ /* * Copyright (c) 2001-2004 Opsycon AB (www.opsycon.se) - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -67,19 +67,19 @@ int pcibr_errintr(void *); pcitag_t pcibr_make_tag(void *, int, int, int); void pcibr_decompose_tag(void *, pcitag_t, int *, int *, int *); -int pcibr_bus_maxdevs(void *, int); +int pcibr_bus_maxdevs(void *, int); pcireg_t pcibr_conf_read(void *, pcitag_t, int); -void pcibr_conf_write(void *, pcitag_t, int, pcireg_t); +void pcibr_conf_write(void *, pcitag_t, int, pcireg_t); int pcibr_intr_map(struct pci_attach_args *, pci_intr_handle_t *); const char *pcibr_intr_string(void *, pci_intr_handle_t); void *pcibr_intr_establish(void *, pci_intr_handle_t, - int, int (*func)(void *), void *, char *); + int, int (*func)(void *), void *, char *); void pcibr_intr_disestablish(void *, void *); struct cfattach macepcibr_ca = { - sizeof(struct pcibr_softc), pcibrmatch, pcibrattach, + sizeof(struct pcibr_softc), pcibrmatch, pcibrattach, }; struct cfdriver macepcibr_cd = { @@ -259,7 +259,7 @@ pcibrprint(aux, pnp) { struct pcibus_attach_args *pba = aux; - if(pnp) + if (pnp) printf("%s at %s", pba->pba_busname, pnp); printf(" bus %d", pba->pba_bus); return(UNCONF); @@ -391,14 +391,14 @@ pcibr_intr_map(struct pci_attach_args *pa, pci_intr_handle_t *ihp) *ihp = -1; - if (pa->pa_intrpin == 0) { - /* No IRQ used. */ - return 1; - } - if (pa->pa_intrpin > 4) { - printf("pcibr_intr_map: bad interrupt pin %d\n", pa->pa_intrpin); - return 1; - } + if (pa->pa_intrpin == 0) { + /* No IRQ used. */ + return 1; + } + if (pa->pa_intrpin > 4) { + printf("pcibr_intr_map: bad interrupt pin %d\n", pa->pa_intrpin); + return 1; + } pcibr_decompose_tag((void *)NULL, pa->pa_tag, &bus, &device, NULL); @@ -506,7 +506,7 @@ pcib_write_8(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, u_int64_t v) int pcib_space_map(bus_space_tag_t t, bus_addr_t offs, bus_size_t size, - int cacheable, bus_space_handle_t *bshp) + int cacheable, bus_space_handle_t *bshp) { bus_addr_t bpa; int error; @@ -530,9 +530,9 @@ pcib_space_map(bus_space_tag_t t, bus_addr_t offs, bus_size_t size, void pcib_space_unmap(bus_space_tag_t t, bus_space_handle_t bsh, bus_size_t size) { - bus_addr_t sva; - bus_size_t off, len; - bus_addr_t paddr; + bus_addr_t sva; + bus_size_t off, len; + bus_addr_t paddr; /* should this verify that the proper size is freed? */ sva = trunc_page(bsh); @@ -561,6 +561,6 @@ int pcib_space_region(bus_space_tag_t t, bus_space_handle_t bsh, bus_size_t offset, bus_size_t size, bus_space_handle_t *nbshp) { - *nbshp = bsh + offset; - return (0); + *nbshp = bsh + offset; + return (0); } diff --git a/sys/arch/sgi/pci/macepcibrvar.h b/sys/arch/sgi/pci/macepcibrvar.h index b45b754e8fb..290baabb271 100644 --- a/sys/arch/sgi/pci/macepcibrvar.h +++ b/sys/arch/sgi/pci/macepcibrvar.h @@ -1,8 +1,8 @@ -/* $OpenBSD: macepcibrvar.h,v 1.1 2004/08/06 21:12:19 pefo Exp $ */ +/* $OpenBSD: macepcibrvar.h,v 1.2 2004/08/10 19:16:18 deraadt Exp $ */ /* * Copyright (c) 2003-2004 Opsycon AB (www.opsycon.se) - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/sys/arch/sgi/pci/pci_machdep.h b/sys/arch/sgi/pci/pci_machdep.h index 319c156139a..9eb5e3570fc 100644 --- a/sys/arch/sgi/pci/pci_machdep.h +++ b/sys/arch/sgi/pci/pci_machdep.h @@ -1,8 +1,8 @@ -/* $OpenBSD: pci_machdep.h,v 1.1 2004/08/06 21:12:19 pefo Exp $ */ +/* $OpenBSD: pci_machdep.h,v 1.2 2004/08/10 19:16:18 deraadt Exp $ */ /* * Copyright (c) 2003-2004 Opsycon AB (www.opsycon.se / www.opsycon.com) - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/sys/arch/sgi/pci/pciide_machdep.c b/sys/arch/sgi/pci/pciide_machdep.c index 93a7bff9615..fb4e90a8b21 100644 --- a/sys/arch/sgi/pci/pciide_machdep.c +++ b/sys/arch/sgi/pci/pciide_machdep.c @@ -1,8 +1,8 @@ -/* $OpenBSD: pciide_machdep.c,v 1.1 2004/08/06 21:12:19 pefo Exp $ */ +/* $OpenBSD: pciide_machdep.c,v 1.2 2004/08/10 19:16:18 deraadt Exp $ */ /* * Copyright (c) 2003-2004 Opsycon AB (www.opsycon.se / www.opsycon.com) - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/sys/arch/sgi/sgi/autoconf.c b/sys/arch/sgi/sgi/autoconf.c index a30d73ee7ec..c671ce16063 100644 --- a/sys/arch/sgi/sgi/autoconf.c +++ b/sys/arch/sgi/sgi/autoconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: autoconf.c,v 1.3 2004/08/10 18:47:22 deraadt Exp $ */ +/* $OpenBSD: autoconf.c,v 1.4 2004/08/10 19:16:18 deraadt Exp $ */ /* * Copyright (c) 1996 Per Fogelstrom * Copyright (c) 1995 Theo de Raadt @@ -237,14 +237,14 @@ rootconf() extern char *nfsbootdevname; #endif - if(boothowto & RB_DFLTROOT) + if (boothowto & RB_DFLTROOT) return; /* Boot compiled in */ /* Lookup boot device from boot if not set by configuration */ - if(bootdv == NULL) { + if (bootdv == NULL) { bootdv = parsedisk(bootdev, strlen(bootdev), 0, &temp); } - if(bootdv == NULL) { + if (bootdv == NULL) { printf("boot device: lookup '%s' failed.\n", bootdev); boothowto |= RB_ASKNAME; /* Don't Panic :-) */ } @@ -263,7 +263,7 @@ rootconf() printf(": "); len = getsn(buf, sizeof(buf)); #ifdef DDB - if(len && strcmp(buf, "ddb") == 0) { + if (len && strcmp(buf, "ddb") == 0) { Debugger(); continue; } @@ -332,8 +332,7 @@ gotswap: dumpdev = nswapdev; swdevt[0].sw_dev = nswapdev; swdevt[1].sw_dev = NODEV; - } - else if(mountroot == NULL) { + } else if (mountroot == NULL) { /* * `swap generic': Use the device the ROM told us to use. */ diff --git a/sys/arch/sgi/sgi/genassym.cf b/sys/arch/sgi/sgi/genassym.cf index 4c8cb4cc8ef..81b1d644d52 100644 --- a/sys/arch/sgi/sgi/genassym.cf +++ b/sys/arch/sgi/sgi/genassym.cf @@ -1,7 +1,7 @@ -# $OpenBSD: genassym.cf,v 1.2 2004/08/08 14:21:27 pefo Exp $ */ +# $OpenBSD: genassym.cf,v 1.3 2004/08/10 19:16:18 deraadt Exp $ */ # # Copyright (c) 1997 Per Fogelstrom / Opsycon AB -# +# # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: diff --git a/sys/arch/sgi/sgi/locore.S b/sys/arch/sgi/sgi/locore.S index de33a8a78ad..3be0143e7ed 100644 --- a/sys/arch/sgi/sgi/locore.S +++ b/sys/arch/sgi/sgi/locore.S @@ -1,8 +1,8 @@ -/* $OpenBSD: locore.S,v 1.2 2004/08/09 14:57:26 pefo Exp $ */ +/* $OpenBSD: locore.S,v 1.3 2004/08/10 19:16:18 deraadt Exp $ */ /* * Copyright (c) 2001-2004 Opsycon AB (www.opsycon.se / www.opsycon.com) - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: diff --git a/sys/arch/sgi/sgi/machdep.c b/sys/arch/sgi/sgi/machdep.c index 58b8d0b8240..d3d919178cd 100644 --- a/sys/arch/sgi/sgi/machdep.c +++ b/sys/arch/sgi/sgi/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.4 2004/08/10 18:47:22 deraadt Exp $ */ +/* $OpenBSD: machdep.c,v 1.5 2004/08/10 19:16:18 deraadt Exp $ */ /* * Copyright (c) 2003-2004 Opsycon AB (www.opsycon.se / www.opsycon.com) @@ -268,12 +268,12 @@ mips_init(int argc, int32_t *argv) /* * Figure out where we was booted from. */ - if(argc > 1) + if (argc > 1) arg0 = (char *)(long)argv[1]; else arg0 = Bios_GetEnvironmentVariable("bootdev"); - if(arg0 == 0) + if (arg0 == 0) arg0 = "unknown"; makebootdev(arg0); @@ -292,13 +292,13 @@ mips_init(int argc, int32_t *argv) /* Check any extra arguments which override. */ for(i = 2; i < argc; i++) { - if(*((char *)(long)argv[i]) == '-') { + if (*((char *)(long)argv[i]) == '-') { dobootopts((char *)(long)argv[i] + 1); } } /* Check l3cache size and disable (hard) if non present. */ - if(Bios_GetEnvironmentVariable("l3cache") != 0) { + if (Bios_GetEnvironmentVariable("l3cache") != 0) { i = atoi(Bios_GetEnvironmentVariable("l3cache"), 10, NULL); CpuTertiaryCacheSize = 1024 * 1024 * i; } else { @@ -318,7 +318,7 @@ mips_init(int argc, int32_t *argv) */ switch(sys_config.cpu[0].type) { case MIPS_RM7000: - if(sys_config.cpu[0].vers_maj < 2) { + if (sys_config.cpu[0].vers_maj < 2) { sys_config.cpu[0].tlbsize = 48; } else { sys_config.cpu[0].tlbsize = 64; @@ -487,7 +487,7 @@ allocsys(caddr_t v) /* * Clear allocated memory. */ - if(start != 0) { + if (start != 0) { bzero(start, v - start); } @@ -896,7 +896,7 @@ enaddr_aton(const char *s, u_int8_t *a) { int i; - if(s != NULL) { + if (s != NULL) { for(i = 0; i < 6; i++) { a[i] = atoi(s, 16, &s); if (*s == ':') @@ -988,7 +988,7 @@ rm7k_perfcntr(cmd, arg1, arg2, arg3) switch(cmd) { case PCNT_FNC_SELECT: - if((arg1 & 0xff) > PCNT_SRC_MAX || + if ((arg1 & 0xff) > PCNT_SRC_MAX || (arg1 & ~(PCNT_CE|PCNT_UM|PCNT_KM|0xff)) != 0) { result = EINVAL; break; @@ -1027,7 +1027,7 @@ rm7k_perfintr(trapframe) printf("perfintr proc %p!\n", p); cp0_setperfcount(cp0_getperfcount() & 0x7fffffff); - if(p != NULL) { + if (p != NULL) { p->p_md.md_pc_spill++; } } -- cgit v1.2.3