From 8dc36c4c0f44802d8f6d8365827f2776899b4103 Mon Sep 17 00:00:00 2001 From: tsutsui Date: Mon, 7 Aug 2006 17:36:53 +0000 Subject: [PATCH] KNF, TAB/space cosmetics --- sys/arch/dreamcast/dev/g2/g2bus.c | 6 +++--- sys/arch/dreamcast/dev/g2/g2bus_bus_mem.c | 8 ++++---- sys/arch/dreamcast/dev/g2/gapspci.c | 25 +++++++++++------------ sys/arch/dreamcast/dev/g2/gapspci_dma.c | 12 +++++------ sys/arch/dreamcast/dev/g2/gapspci_pci.c | 12 +++++------ 5 files changed, 31 insertions(+), 32 deletions(-) diff --git a/sys/arch/dreamcast/dev/g2/g2bus.c b/sys/arch/dreamcast/dev/g2/g2bus.c index f0c30f397d26..1b1c4ac6568a 100644 --- a/sys/arch/dreamcast/dev/g2/g2bus.c +++ b/sys/arch/dreamcast/dev/g2/g2bus.c @@ -1,4 +1,4 @@ -/* $NetBSD: g2bus.c,v 1.12 2005/12/11 12:17:06 christos Exp $ */ +/* $NetBSD: g2bus.c,v 1.13 2006/08/07 17:36:53 tsutsui Exp $ */ /*- * Copyright (c) 2001 Marcus Comstedt @@ -34,7 +34,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: g2bus.c,v 1.12 2005/12/11 12:17:06 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: g2bus.c,v 1.13 2006/08/07 17:36:53 tsutsui Exp $"); #include #include @@ -60,7 +60,7 @@ int g2busmatch(struct device *parent, struct cfdata *cf, void *aux) { - return 1; + return 1; } void diff --git a/sys/arch/dreamcast/dev/g2/g2bus_bus_mem.c b/sys/arch/dreamcast/dev/g2/g2bus_bus_mem.c index eb64eabc070b..918e1d8ec927 100644 --- a/sys/arch/dreamcast/dev/g2/g2bus_bus_mem.c +++ b/sys/arch/dreamcast/dev/g2/g2bus_bus_mem.c @@ -1,4 +1,4 @@ -/* $NetBSD: g2bus_bus_mem.c,v 1.12 2005/12/24 20:06:59 perry Exp $ */ +/* $NetBSD: g2bus_bus_mem.c,v 1.13 2006/08/07 17:36:53 tsutsui Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -46,13 +46,13 @@ */ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: g2bus_bus_mem.c,v 1.12 2005/12/24 20:06:59 perry Exp $"); +__KERNEL_RCSID(0, "$NetBSD: g2bus_bus_mem.c,v 1.13 2006/08/07 17:36:53 tsutsui Exp $"); #include -#include +#include #include -#include +#include #include #include diff --git a/sys/arch/dreamcast/dev/g2/gapspci.c b/sys/arch/dreamcast/dev/g2/gapspci.c index 21cbb7ed55fe..fcf84e2534bc 100644 --- a/sys/arch/dreamcast/dev/g2/gapspci.c +++ b/sys/arch/dreamcast/dev/g2/gapspci.c @@ -1,4 +1,4 @@ -/* $NetBSD: gapspci.c,v 1.14 2005/12/11 12:17:06 christos Exp $ */ +/* $NetBSD: gapspci.c,v 1.15 2006/08/07 17:36:53 tsutsui Exp $ */ /*- * Copyright (c) 2001 Marcus Comstedt @@ -33,7 +33,7 @@ */ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: gapspci.c,v 1.14 2005/12/11 12:17:06 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: gapspci.c,v 1.15 2006/08/07 17:36:53 tsutsui Exp $"); #include #include @@ -63,19 +63,18 @@ CFATTACH_DECL(gapspci, sizeof(struct gaps_softc), int gaps_match(struct device *parent, struct cfdata *match, void *aux) { - struct g2bus_attach_args *ga = aux; + struct g2bus_attach_args *ga = aux; char idbuf[16]; bus_space_handle_t tmp_memh; if (bus_space_map(ga->ga_memt, 0x01001400, 0x100, 0, &tmp_memh) != 0) return 0; - bus_space_read_region_1(ga->ga_memt, tmp_memh, 0, - idbuf, sizeof(idbuf)); + bus_space_read_region_1(ga->ga_memt, tmp_memh, 0, idbuf, sizeof(idbuf)); bus_space_unmap(ga->ga_memt, tmp_memh, 0x100); - if(strncmp(idbuf, "GAPSPCI_BRIDGE_2", 16)) + if (strncmp(idbuf, "GAPSPCI_BRIDGE_2", 16)) return 0; return 1; @@ -97,22 +96,22 @@ gaps_attach(struct device *parent, struct device *self, void *aux) sc->sc_dmasize = 32768; if (bus_space_map(sc->sc_memt, 0x01001400, 0x100, - 0, &sc->sc_gaps_memh) != 0) + 0, &sc->sc_gaps_memh) != 0) panic("gaps_attach: can't map GAPS register space"); bus_space_write_4(sc->sc_memt, sc->sc_gaps_memh, 0x18, 0x5a14a501); - for(i=0; i<1000000; i++) - ; - - if(bus_space_read_4(sc->sc_memt, sc->sc_gaps_memh, 0x18) != 1) + for (i = 0; i < 1000000; i++) + ; + + if (bus_space_read_4(sc->sc_memt, sc->sc_gaps_memh, 0x18) != 1) panic("gaps_attach: GAPS PCI bridge not responding"); bus_space_write_4(sc->sc_memt, sc->sc_gaps_memh, 0x20, 0x1000000); bus_space_write_4(sc->sc_memt, sc->sc_gaps_memh, 0x24, 0x1000000); bus_space_write_4(sc->sc_memt, sc->sc_gaps_memh, 0x28, sc->sc_dmabase); bus_space_write_4(sc->sc_memt, sc->sc_gaps_memh, 0x2c, - sc->sc_dmabase + sc->sc_dmasize); + sc->sc_dmabase + sc->sc_dmasize); bus_space_write_4(sc->sc_memt, sc->sc_gaps_memh, 0x14, 1); bus_space_write_4(sc->sc_memt, sc->sc_gaps_memh, 0x34, 1); @@ -129,5 +128,5 @@ gaps_attach(struct device *parent, struct device *self, void *aux) pba.pba_flags = PCI_FLAGS_MEM_ENABLED; pba.pba_pc = &sc->sc_pc; - (void) config_found_ia(self, "pcibus", &pba, pcibusprint); + (void)config_found_ia(self, "pcibus", &pba, pcibusprint); } diff --git a/sys/arch/dreamcast/dev/g2/gapspci_dma.c b/sys/arch/dreamcast/dev/g2/gapspci_dma.c index 0a6705003d1a..f1e731c705f0 100644 --- a/sys/arch/dreamcast/dev/g2/gapspci_dma.c +++ b/sys/arch/dreamcast/dev/g2/gapspci_dma.c @@ -1,4 +1,4 @@ -/* $NetBSD: gapspci_dma.c,v 1.12 2005/11/24 13:08:33 yamt Exp $ */ +/* $NetBSD: gapspci_dma.c,v 1.13 2006/08/07 17:36:53 tsutsui Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -46,16 +46,16 @@ */ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: gapspci_dma.c,v 1.12 2005/11/24 13:08:33 yamt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: gapspci_dma.c,v 1.13 2006/08/07 17:36:53 tsutsui Exp $"); #include -#include +#include #include #include #include #include -#include +#include #include #include @@ -189,7 +189,7 @@ gaps_dmamap_create(bus_dma_tag_t t, bus_size_t size, int nsegments, map->dm_segs[0].ds_addr = res; map->dm_segs[0].ds_len = size; - + map->dm_mapsize = size; map->dm_nsegs = 1; } else { @@ -617,7 +617,7 @@ gaps_dmamem_unmap(bus_dma_tag_t t, caddr_t kva, size_t size) if ((u_long) kva & PAGE_MASK) panic("gaps_dmamem_unmap"); #endif - + /* * Nothing to do if we mapped it with P2SEG. */ diff --git a/sys/arch/dreamcast/dev/g2/gapspci_pci.c b/sys/arch/dreamcast/dev/g2/gapspci_pci.c index b0c1db692264..4d4cb60d28e2 100644 --- a/sys/arch/dreamcast/dev/g2/gapspci_pci.c +++ b/sys/arch/dreamcast/dev/g2/gapspci_pci.c @@ -1,4 +1,4 @@ -/* $NetBSD: gapspci_pci.c,v 1.8 2005/12/11 12:17:06 christos Exp $ */ +/* $NetBSD: gapspci_pci.c,v 1.9 2006/08/07 17:36:53 tsutsui Exp $ */ /*- * Copyright (c) 2001 Marcus Comstedt. @@ -38,13 +38,13 @@ */ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: gapspci_pci.c,v 1.8 2005/12/11 12:17:06 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: gapspci_pci.c,v 1.9 2006/08/07 17:36:53 tsutsui Exp $"); #include #include #include -#include - +#include + #include #include #include @@ -53,7 +53,7 @@ __KERNEL_RCSID(0, "$NetBSD: gapspci_pci.c,v 1.8 2005/12/11 12:17:06 christos Exp #include #include - + void gaps_attach_hook(struct device *, struct device *, struct pcibus_attach_args *); int gaps_bus_maxdevs(void *, int); @@ -99,7 +99,7 @@ void gaps_attach_hook(struct device *bus, struct device *pci, struct pcibus_attach_args *pba) { - struct gaps_softc *sc = (void *) bus; + struct gaps_softc *sc = (void *)bus; /* * Now that we know there's a bus configured, go ahead and