From 55c60d8c87724d7e17dd5f66600ffcc4a6f6c748 Mon Sep 17 00:00:00 2001 From: Sepherosa Ziehau Date: Sun, 5 Jul 2009 19:03:32 +0800 Subject: [PATCH] pci: White space cleanup --- sys/bus/isa/isa_common.c | 11 ++++++----- sys/conf/files | 22 +++++++++++----------- sys/platform/pc32/conf/files | 8 ++++---- sys/sys/bus.h | 30 +++++++++++++++--------------- sys/sys/pciio.h | 30 +++++++++++++++--------------- 5 files changed, 51 insertions(+), 50 deletions(-) diff --git a/sys/bus/isa/isa_common.c b/sys/bus/isa/isa_common.c index b18affdee3..d4530330c5 100644 --- a/sys/bus/isa/isa_common.c +++ b/sys/bus/isa/isa_common.c @@ -1051,9 +1051,10 @@ DRIVER_MODULE(isa, nexus, isa_driver, isa_devclass, 0, 0); int isab_attach(device_t dev) { - device_t child; - child = device_add_child(dev, "isa", 0); - if (child != NULL) - return (bus_generic_attach(dev)); - return (ENXIO); + device_t child; + + child = device_add_child(dev, "isa", 0); + if (child != NULL) + return (bus_generic_attach(dev)); + return (ENXIO); } diff --git a/sys/conf/files b/sys/conf/files index 4391b7922a..d06e79ec40 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -1330,17 +1330,17 @@ dev/video/meteor/meteor.c optional meteor pci dev/disk/ncr/ncr.c optional ncr dev/disk/sym/sym_hipd.c optional sym \ dependency "$S/dev/disk/sym/sym_{conf,defs}.h" -bus/pci/eisa_pci.c optional pci eisa -bus/pci/fixup_pci.c optional pci -bus/pci/hostb_pci.c optional pci -bus/pci/ignore_pci.c optional pci -bus/pci/isa_pci.c optional pci isa -bus/pci/pci.c optional pci -bus/pci/pci_if.m optional pci -bus/pci/pci_pci.c optional pci -bus/pci/pci_user.c optional pci -bus/pci/pcib_if.m optional pci -bus/pci/vga_pci.c optional pci +bus/pci/eisa_pci.c optional pci eisa +bus/pci/fixup_pci.c optional pci +bus/pci/hostb_pci.c optional pci +bus/pci/ignore_pci.c optional pci +bus/pci/isa_pci.c optional pci isa +bus/pci/pci.c optional pci +bus/pci/pci_if.m optional pci +bus/pci/pci_pci.c optional pci +bus/pci/pci_user.c optional pci +bus/pci/pcib_if.m optional pci +bus/pci/vga_pci.c optional pci dev/powermng/i386/alpm/alpm.c optional alpm kern/kern_posix4_mib.c standard kern/kern_p1003_1b.c standard diff --git a/sys/platform/pc32/conf/files b/sys/platform/pc32/conf/files index 452c9c8e1d..6cd9b1f07b 100644 --- a/sys/platform/pc32/conf/files +++ b/sys/platform/pc32/conf/files @@ -219,10 +219,10 @@ dev/misc/labpc/labpc.c optional labpc dev/misc/mse/mse.c optional mse platform/pc32/isa/npx.c mandatory npx bus/iicbus/i386/pcf.c optional pcf -bus/pci/i386/legacy.c optional pci -bus/pci/i386/pci_bus.c optional pci -bus/pci/i386/pci_cfgreg.c optional pci -bus/pci/i386/pci_pir.c optional pci +bus/pci/i386/legacy.c optional pci +bus/pci/i386/pci_bus.c optional pci +bus/pci/i386/pci_cfgreg.c optional pci +bus/pci/i386/pci_pir.c optional pci platform/pc32/isa/pmtimer.c optional pmtimer acpi # XXX drhodus platform/pc32/isa/prof_machdep.c optional profiling-routine diff --git a/sys/sys/bus.h b/sys/sys/bus.h index c74d69dbbb..a374363fa1 100644 --- a/sys/sys/bus.h +++ b/sys/sys/bus.h @@ -510,21 +510,21 @@ DECLARE_MODULE(name##_##busname, name##_##busname##_mod, \ /** * Generic ivar accessor generation macros for bus drivers */ -#define __BUS_ACCESSOR(varp, var, ivarp, ivar, type) \ - \ -static __inline type varp ## _get_ ## var(device_t dev) \ -{ \ - uintptr_t v; \ - BUS_READ_IVAR(device_get_parent(dev), dev, \ - ivarp ## _IVAR_ ## ivar, &v); \ - return ((type) v); \ -} \ - \ -static __inline void varp ## _set_ ## var(device_t dev, type t) \ -{ \ - uintptr_t v = (uintptr_t) t; \ - BUS_WRITE_IVAR(device_get_parent(dev), dev, \ - ivarp ## _IVAR_ ## ivar, v); \ +#define __BUS_ACCESSOR(varp, var, ivarp, ivar, type) \ + \ +static __inline type varp ## _get_ ## var(device_t dev) \ +{ \ + uintptr_t v; \ + BUS_READ_IVAR(device_get_parent(dev), dev, \ + ivarp ## _IVAR_ ## ivar, &v); \ + return ((type) v); \ +} \ + \ +static __inline void varp ## _set_ ## var(device_t dev, type t) \ +{ \ + uintptr_t v = (uintptr_t) t; \ + BUS_WRITE_IVAR(device_get_parent(dev), dev, \ + ivarp ## _IVAR_ ## ivar, v); \ } /** diff --git a/sys/sys/pciio.h b/sys/sys/pciio.h index d0632e7ec0..1667c69b7d 100644 --- a/sys/sys/pciio.h +++ b/sys/sys/pciio.h @@ -49,16 +49,16 @@ typedef enum { } pci_getconf_status; typedef enum { - PCI_GETCONF_NO_MATCH = 0x0000, - PCI_GETCONF_MATCH_DOMAIN = 0x0001, - PCI_GETCONF_MATCH_BUS = 0x0002, - PCI_GETCONF_MATCH_DEV = 0x0004, - PCI_GETCONF_MATCH_FUNC = 0x0008, - PCI_GETCONF_MATCH_NAME = 0x0010, - PCI_GETCONF_MATCH_UNIT = 0x0020, - PCI_GETCONF_MATCH_VENDOR = 0x0040, - PCI_GETCONF_MATCH_DEVICE = 0x0080, - PCI_GETCONF_MATCH_CLASS = 0x0100 + PCI_GETCONF_NO_MATCH = 0x0000, + PCI_GETCONF_MATCH_DOMAIN = 0x0001, + PCI_GETCONF_MATCH_BUS = 0x0002, + PCI_GETCONF_MATCH_DEV = 0x0004, + PCI_GETCONF_MATCH_FUNC = 0x0008, + PCI_GETCONF_MATCH_NAME = 0x0010, + PCI_GETCONF_MATCH_UNIT = 0x0020, + PCI_GETCONF_MATCH_VENDOR = 0x0040, + PCI_GETCONF_MATCH_DEVICE = 0x0080, + PCI_GETCONF_MATCH_CLASS = 0x0100 } pci_getconf_flags; struct pcisel { @@ -115,11 +115,11 @@ struct pci_io { }; struct pci_bar_io { - struct pcisel pbi_sel; /* device to operate on */ - int pbi_reg; /* starting address of BAR */ - int pbi_enabled; /* decoding enabled */ - uint64_t pbi_base; /* current value of BAR */ - uint64_t pbi_length; /* length of BAR */ + struct pcisel pbi_sel; /* device to operate on */ + int pbi_reg; /* starting address of BAR */ + int pbi_enabled; /* decoding enabled */ + uint64_t pbi_base; /* current value of BAR */ + uint64_t pbi_length; /* length of BAR */ }; #define PCIOCGETCONF _IOWR('p', 5, struct pci_conf_io) -- 2.41.0