x86: clean up empty lines in .c and .h files

This commit is contained in:
Mateusz Guzik 2020-09-01 21:23:59 +00:00
parent d90f2c3617
commit ab6c81a218
40 changed files with 15 additions and 63 deletions

View File

@ -405,7 +405,6 @@ madt_setup_cpus_handler(ACPI_SUBTABLE_HEADER *entry, void *arg)
}
}
/*
* Add an I/O APIC from an entry in the table.
*/

View File

@ -888,7 +888,6 @@ static device_method_t est_methods[] = {
/* ACPI interface */
DEVMETHOD(acpi_get_features, est_features),
{0, 0}
};

View File

@ -153,7 +153,6 @@ static device_method_t hwpstate_methods[] = {
/* ACPI interface */
DEVMETHOD(acpi_get_features, hwpstate_features),
{0, 0}
};

View File

@ -57,7 +57,7 @@ __FBSDID("$FreeBSD$");
#include <dev/acpica/acpivar.h>
#include "acpi_if.h"
struct p4tcc_softc {
device_t dev;
int set_count;
@ -97,7 +97,6 @@ static device_method_t p4tcc_methods[] = {
/* ACPI interface */
DEVMETHOD(acpi_get_features, p4tcc_features),
{0, 0}
};

View File

@ -146,7 +146,6 @@ struct pst_header {
#define ACPI_PN8_CTRL_TO_RVO(x) (((x) >> 28) & 0x03)
#define ACPI_PN8_CTRL_TO_IRT(x) (((x) >> 30) & 0x03)
#define WRITE_FIDVID(fid, vid, ctrl) \
wrmsr(MSR_AMDK7_FIDVID_CTL, \
(((ctrl) << 32) | (1ULL << 16) | ((vid) << 8) | (fid)))
@ -169,7 +168,6 @@ static int pn7_fid_to_mult[32] = {
150, 225, 160, 165, 170, 180, 0, 0,
};
static int pn8_fid_to_mult[64] = {
40, 45, 50, 55, 60, 65, 70, 75,
80, 85, 90, 95, 100, 105, 110, 115,
@ -262,7 +260,6 @@ static device_method_t pn_methods[] = {
DEVMETHOD(cpufreq_drv_get, pn_get),
DEVMETHOD(cpufreq_drv_settings, pn_settings),
DEVMETHOD(cpufreq_drv_type, pn_type),
{0, 0}
};

View File

@ -100,7 +100,6 @@ static device_method_t smist_methods[] = {
DEVMETHOD(cpufreq_drv_get, smist_get),
DEVMETHOD(cpufreq_drv_type, smist_type),
DEVMETHOD(cpufreq_drv_settings, smist_settings),
{0, 0}
};

View File

@ -70,7 +70,7 @@ int acpi_release_global_lock(volatile uint32_t *);
#define ACPI_RELEASE_GLOBAL_LOCK(GLptr, Acq) do { \
(Acq) = acpi_release_global_lock(&((GLptr)->GlobalLock)); \
} while (0)
enum intr_trigger;
enum intr_polarity;

View File

@ -110,12 +110,10 @@
* 3F0 Reserved
*/
/******************************************************************************
* global defines, etc.
*/
/******************************************************************************
* LOCAL APIC structure
*/
@ -286,7 +284,6 @@ typedef struct IOAPIC ioapic_t;
#endif /* !LOCORE */
/******************************************************************************
* various code 'logical' values
*/
@ -412,7 +409,6 @@ typedef struct IOAPIC ioapic_t;
#define APIC_LVT_TM 0x00008000
#define APIC_LVT_M 0x00010000
/* fields in LVT Timer */
#define APIC_LVTT_VECTOR 0x000000ff
#define APIC_LVTT_DS 0x00001000

View File

@ -229,7 +229,6 @@ struct apic_ops {
void (*disable_vector)(u_int, u_int);
void (*free_vector)(u_int, u_int, u_int);
/* PMC */
int (*enable_pmc)(void);
void (*disable_pmc)(void);

View File

@ -76,7 +76,6 @@
#define APME_NOPMEVENT 0x80
#define APME_NOAPMPRESENT 0x86
/* device code */
#define PMDV_APMBIOS 0x0000
#define PMDV_ALLDEV 0x0001

View File

@ -194,7 +194,6 @@ bus_space_free(bus_space_tag_t t __unused, bus_space_handle_t bsh __unused,
{
}
/*
* Read a 1, 2, 4, or 8 byte quantity from bus space
* described by tag/handle/offset.
@ -362,7 +361,6 @@ static __inline void bus_space_read_region_4(bus_space_tag_t tag,
bus_size_t offset, u_int32_t *addr,
size_t count);
static __inline void
bus_space_read_region_1(bus_space_tag_t tag, bus_space_handle_t bsh,
bus_size_t offset, u_int8_t *addr, size_t count)

View File

@ -192,4 +192,3 @@ _bus_dmamap_complete(bus_dma_tag_t dmat, bus_dmamap_t map,
}
#endif /* !_X86_BUS_DMA_H_ */

View File

@ -122,7 +122,6 @@ typedef struct { /* Auxiliary vector entry on initial stack */
} a_un;
} Elf32_Auxinfo;
typedef struct { /* Auxiliary vector entry on initial stack */
long a_type; /* Entry type. */
union {

View File

@ -866,7 +866,6 @@ dmar_find_nonpci(u_int id, u_int entry_type, uint16_t *rid)
return (NULL);
}
struct dmar_unit *
dmar_find_hpet(device_t dev, uint16_t *rid)
{

View File

@ -267,7 +267,7 @@ domain_get_idmap_pgtbl(struct dmar_domain *domain, iommu_gaddr_t maxaddr)
dmar_flush_write_bufs(unit);
DMAR_UNLOCK(unit);
}
return (res);
}

View File

@ -310,7 +310,6 @@ atpic_disable_intr(struct intsrc *isrc)
{
}
static int
atpic_vector(struct intsrc *isrc)
{
@ -562,7 +561,7 @@ static int
atpic_probe(device_t dev)
{
int result;
result = ISA_PNP_PROBE(device_get_parent(dev), dev, atpic_ids);
if (result <= 0)
device_quiet(dev);

View File

@ -617,7 +617,6 @@ static device_method_t atrtc_isa_methods[] = {
/* clock interface */
DEVMETHOD(clock_gettime, atrtc_gettime),
DEVMETHOD(clock_settime, atrtc_settime),
{ 0, 0 }
};
@ -639,7 +638,6 @@ static device_method_t atrtc_acpi_methods[] = {
/* clock interface */
DEVMETHOD(clock_gettime, atrtc_gettime),
DEVMETHOD(clock_settime, atrtc_settime),
{ 0, 0 }
};

View File

@ -543,7 +543,7 @@ attimer_stop(struct eventtimer *et)
{
device_t dev = (device_t)et->et_priv;
struct attimer_softc *sc = device_get_softc(dev);
sc->mode = MODE_STOP;
sc->period = 0;
set_i8254_freq(sc->mode, sc->period);
@ -563,7 +563,7 @@ static int
attimer_probe(device_t dev)
{
int result;
result = ISA_PNP_PROBE(device_get_parent(dev), dev, attimer_ids);
/* ENOENT means no PnP-ID, device is hinted. */
if (result == ENOENT) {

View File

@ -97,7 +97,7 @@ isa_alloc_resource(device_t bus, device_t child, int type, int *rid,
struct isa_device* idev = DEVTOISA(child);
struct resource_list *rl = &idev->id_resources;
struct resource_list_entry *rle;
if (!passthrough && !isdefault) {
rle = resource_list_find(rl, type, *rid);
if (!rle) {

View File

@ -95,7 +95,6 @@ isa_dma_init(int chan, u_int bouncebufsize, int flag)
panic("isa_dma_init: channel out of range");
#endif
/* Try malloc() first. It works better if it works. */
buf = malloc(bouncebufsize, M_DEVBUF, flag);
if (buf != NULL) {
@ -576,7 +575,7 @@ static int
atdma_probe(device_t dev)
{
int result;
if ((result = ISA_PNP_PROBE(device_get_parent(dev), dev, atdma_ids)) <= 0)
device_quiet(dev);
return(result);

View File

@ -61,7 +61,7 @@ isa_nmi(int cd)
int eisa_port = inb(0x461);
log(LOG_CRIT, "NMI ISA %x, EISA %x\n", isa_port, eisa_port);
if (isa_port & NMI_PARITY) {
log(LOG_CRIT, "RAM parity error, likely hardware failure.");
retval = 1;

View File

@ -163,7 +163,7 @@ orm_detach(device_t dev)
{
int i;
struct orm_softc *sc = device_get_softc(dev);
for (i = 0; i < sc->rnum; i++)
bus_release_resource(dev, SYS_RES_MEMORY, sc->rid[i],
sc->res[i]);

View File

@ -397,7 +397,6 @@ legacy_pcib_identify(driver_t *driver, device_t parent)
devclass_get_device(pci_devclass, 0))
return;
bus = 0;
retry:
for (slot = 0; slot <= PCI_SLOTMAX; slot++) {
@ -675,7 +674,6 @@ static devclass_t hostb_devclass;
DEFINE_CLASS_0(pcib, legacy_pcib_driver, legacy_pcib_methods, 1);
DRIVER_MODULE(pcib, legacy, legacy_pcib_driver, hostb_devclass, 0, 0);
/*
* Install placeholder to claim the resources owned by the
* PCI bus interface. This could be used to extract the
@ -737,7 +735,6 @@ static device_method_t pcibios_pcib_pci_methods[] = {
/* pcib interface */
DEVMETHOD(pcib_route_interrupt, legacy_pcib_route_interrupt),
{0, 0}
};

View File

@ -211,7 +211,6 @@ static device_method_t qpi_methods[] = {
DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource),
DEVMETHOD(bus_setup_intr, bus_generic_setup_intr),
DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr),
{ 0, 0 }
};

View File

@ -215,7 +215,7 @@ bounce_bus_dma_tag_create(bus_dma_tag_t parent, bus_size_t alignment,
error = bounce_bus_dma_zone_setup(newtag);
else
error = 0;
if (error != 0)
free(newtag, M_DEVBUF);
else
@ -394,7 +394,6 @@ bounce_bus_dmamap_destroy(bus_dma_tag_t dmat, bus_dmamap_t map)
return (0);
}
/*
* Allocate a piece of memory that can be efficiently mapped into
* bus device space based on the constraints lited in the dma tag.

View File

@ -779,7 +779,6 @@ printcpuinfo(void)
* http://www.intel.com/assets/pdf/appnote/241618.pdf
*/
if (cpu_high > 0) {
/*
* Here we should probably set up flags indicating
* whether or not various features are available.
@ -1277,7 +1276,6 @@ identblue(void)
return IDENTBLUE_IBMCPU;
}
/*
* identifycyrix() set lower 16 bits of cyrix_did as follows:
*

View File

@ -510,7 +510,6 @@ ioapic_enable_intr(struct intsrc *isrc)
apic_enable_vector(intpin->io_cpu, intpin->io_vector);
}
static void
ioapic_disable_intr(struct intsrc *isrc)
{
@ -1054,7 +1053,6 @@ static device_method_t ioapic_pci_methods[] = {
/* Device interface */
DEVMETHOD(device_probe, ioapic_pci_probe),
DEVMETHOD(device_attach, ioapic_pci_attach),
{ 0, 0 }
};
@ -1146,7 +1144,6 @@ static device_method_t apic_methods[] = {
DEVMETHOD(device_identify, apic_identify),
DEVMETHOD(device_probe, apic_probe),
DEVMETHOD(device_attach, apic_attach),
{ 0, 0 }
};

View File

@ -91,7 +91,6 @@ static device_method_t legacy_methods[] = {
DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource),
DEVMETHOD(bus_setup_intr, bus_generic_setup_intr),
DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr),
{ 0, 0 }
};
@ -242,7 +241,6 @@ legacy_read_ivar(device_t dev, device_t child, int which, uintptr_t *result)
}
return 0;
}
static int
legacy_write_ivar(device_t dev, device_t child, int which, uintptr_t value)

View File

@ -666,7 +666,6 @@ native_lapic_create(u_int apic_id, int boot_cpu)
lapics[apic_id].la_ioint_irqs[IDT_EVTCHN - APIC_IO_INTS] = IRQ_EVTCHN;
#endif
#ifdef SMP
cpu_add(apic_id, boot_cpu);
#endif
@ -1564,7 +1563,6 @@ native_apic_alloc_vectors(u_int apic_id, u_int *irqs, u_int count, u_int align)
first = 0;
mtx_lock_spin(&icu_lock);
for (vector = 0; vector < APIC_NUM_IOINTS; vector++) {
/* Vector is in use, end run. */
if (lapics[apic_id].la_ioint_irqs[vector] != IRQ_FREE) {
run = 0;

View File

@ -789,7 +789,7 @@ mca_scan(enum scan_mode mode, int *recoverablep)
}
mca_record_entry(mode, &rec);
}
#ifdef DEV_APIC
/*
* If this is a bank this CPU monitors via CMCI,

View File

@ -1146,7 +1146,6 @@ set_interrupt_apic_ids(void)
}
}
#ifdef COUNT_XINVLTLB_HITS
u_int xhits_gbl[MAXCPU];
u_int xhits_pg[MAXCPU];

View File

@ -496,7 +496,6 @@ mptable_probe_cpus_handler(u_char *entry, void *arg)
}
}
static void
mptable_setup_cpus_handler(u_char *entry, void *arg)
{
@ -581,7 +580,6 @@ mptable_parse_apics_and_busses_handler(u_char *entry, void *arg __unused)
enum busTypes bus_type;
int i;
switch (*entry) {
case MPCT_ENTRY_BUS:
bus = (bus_entry_ptr)entry;

View File

@ -230,7 +230,6 @@ static device_method_t mptable_pcib_pci_methods[] = {
/* pcib interface */
DEVMETHOD(pcib_route_interrupt, mptable_pci_route_interrupt),
{0, 0}
};

View File

@ -187,7 +187,6 @@ static device_method_t nexus_methods[] = {
DEVMETHOD(pcib_release_msix, nexus_release_msix),
DEVMETHOD(pcib_map_msi, nexus_map_msi),
#endif
{ 0, 0 }
};
@ -537,7 +536,7 @@ static int
nexus_unmap_resource(device_t bus, device_t child, int type, struct resource *r,
struct resource_map *map)
{
/*
* If this is a memory resource, unmap it.
*/

View File

@ -507,7 +507,6 @@ x86_mrsetvariable(struct mem_range_softc *sc, struct mem_range_desc *mrd,
/* Exact match? */
if (curr_md->mr_base == mrd->mr_base &&
curr_md->mr_len == mrd->mr_len) {
/* Whoops, owned by someone. */
if (curr_md->mr_flags & MDF_BUSY)
return (EBUSY);

View File

@ -416,7 +416,7 @@ xen_hvm_resume(bool suspend_cancelled)
/* Register vcpu_info area for CPU#0. */
xen_hvm_cpu_init();
}
static void
xen_hvm_sysinit(void *arg __unused)
{

View File

@ -406,7 +406,6 @@ xen_pv_start_all_aps(void)
mtx_init(&ap_boot_mtx, "ap boot", NULL, MTX_SPIN);
for (cpu = 1; cpu < mp_ncpus; cpu++) {
/* attempt to start the Application Processor */
if (!start_xen_ap(cpu))
panic("AP #%d failed to start!", cpu);

View File

@ -61,7 +61,6 @@ __FBSDID("$FreeBSD$");
#define XEN_APIC_UNSUPPORTED \
panic("%s: not available in Xen PV port.", __func__)
/*--------------------------- Forward Declarations ---------------------------*/
#ifdef SMP
static driver_filter_t xen_smp_rendezvous_action;
@ -549,7 +548,6 @@ xen_cpu_ipi_init(int cpu)
ipi_handle = DPCPU_ID_GET(cpu, ipi_handle);
for (ipi = xen_ipis, idx = 0; idx < nitems(xen_ipis); ipi++, idx++) {
if (ipi->filter == NULL) {
ipi_handle[idx] = NULL;
continue;

View File

@ -560,7 +560,6 @@ xen_intr_handle_upcall(struct trapframe *trap_frame)
(*pc->evtchn_intrcnt)++;
while (l1 != 0) {
l1i = (l1i + 1) % LONG_BIT;
masked_l1 = l1 & ((~0UL) << l1i);
@ -1573,7 +1572,7 @@ xen_intr_port(xen_intr_handle_t handle)
isrc = xen_intr_isrc(handle);
if (isrc == NULL)
return (0);
return (isrc->xi_port);
}

View File

@ -157,7 +157,6 @@ static device_method_t nexus_xen_methods[] = {
DEVMETHOD(pcib_alloc_msix, nexus_xen_alloc_msix),
DEVMETHOD(pcib_release_msix, nexus_xen_release_msix),
DEVMETHOD(pcib_map_msi, nexus_xen_map_msi),
{ 0, 0 }
};