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

This commit is contained in:
mjg 2020-09-01 21:19:39 +00:00
parent e490a9e1b8
commit 8c3488b27a
34 changed files with 21 additions and 84 deletions

View File

@ -300,7 +300,6 @@ static device_method_t nexus_acpi_methods[] = {
/* Device interface */
DEVMETHOD(device_probe, nexus_acpi_probe),
DEVMETHOD(device_attach, nexus_acpi_attach),
{ 0, 0 }
};

View File

@ -397,7 +397,6 @@ apm_del_hook(struct apmhook **list, struct apmhook *ah)
*list = p->ah_next;
}
/* APM driver calls some functions automatically */
static void
apm_execute_hook(struct apmhook *list)
@ -411,7 +410,6 @@ apm_execute_hook(struct apmhook *list)
}
}
/* establish an apm hook */
struct apmhook *
apm_hook_establish(int apmh, struct apmhook *ah)
@ -583,7 +581,6 @@ apm_resume(void)
EVENTHANDLER_INVOKE(power_resume);
}
/* get power status per battery */
static int
apm_get_pwstatus(apm_pwstatus_t app)
@ -619,7 +616,6 @@ apm_get_pwstatus(apm_pwstatus_t app)
return 0;
}
/* get APM information */
static int
apm_get_info(apm_info_t aip)
@ -658,7 +654,6 @@ apm_get_info(apm_info_t aip)
return 0;
}
/* inform APM BIOS that CPU is idle */
void
apm_cpu_idle(void)
@ -666,7 +661,6 @@ apm_cpu_idle(void)
struct apm_softc *sc = &apm_softc;
if (sc->active) {
sc->bios.r.eax = (APM_BIOS <<8) | APM_CPUIDLE;
sc->bios.r.edx = sc->bios.r.ecx = sc->bios.r.ebx = 0;
(void) apm_bioscall();
@ -697,14 +691,12 @@ apm_cpu_busy(void)
* necessary.
*/
if (sc->slow_idle_cpu && sc->active) {
sc->bios.r.eax = (APM_BIOS <<8) | APM_CPUBUSY;
sc->bios.r.edx = sc->bios.r.ecx = sc->bios.r.ebx = 0;
apm_bioscall();
}
}
/*
* APM thread loop.
*
@ -935,7 +927,6 @@ apm_probe(device_t dev)
return(0);
}
/*
* return 0 if the user will notice and handle the event,
* return 1 if the kernel driver should do so.
@ -1171,7 +1162,6 @@ apm_attach(device_t dev)
((apm_version & 0x00f0) >> 4) * 10 + ((apm_version & 0x000f) >> 0),
sc->majorversion, sc->minorversion);
APM_DPRINT("apm: Slow Idling CPU %s\n", is_enabled(sc->slow_idle_cpu));
/* enable power management */
if (sc->disabled) {
@ -1472,7 +1462,6 @@ static device_method_t apm_methods[] = {
DEVMETHOD(device_identify, apm_identify),
DEVMETHOD(device_probe, apm_probe),
DEVMETHOD(device_attach, apm_attach),
{ 0, 0 }
};

View File

@ -91,7 +91,6 @@ bios32_init(void *junk)
/* look for the signature */
if ((sigaddr = bios_sigsearch(0, "_32_", 4, 16, 0)) != 0) {
/* get a virtual pointer to the structure */
sdh = (struct bios32_SDheader *)(uintptr_t)BIOS_PADDRTOVADDR(sigaddr);
for (cv = (u_int8_t *)sdh, ck = 0, i = 0; i < (sdh->len * 16); i++) {
@ -109,7 +108,6 @@ bios32_init(void *junk)
/* Allow user override of PCI BIOS search */
if (((p = kern_getenv("machdep.bios.pci")) == NULL) || strcmp(p, "disable")) {
/* See if there's a PCI BIOS entrypoint here */
PCIbios.ident.id = 0x49435024; /* PCI systems should have this */
if (!bios32_SDlookup(&PCIbios) && bootverbose)
@ -129,7 +127,6 @@ bios32_init(void *junk)
*/
if ((((p = kern_getenv("machdep.bios.pnp")) == NULL) || strcmp(p, "disable")) &&
((sigaddr = bios_sigsearch(0, "$PnP", 4, 16, 0)) != 0)) {
/* get a virtual pointer to the structure */
pt = (struct PnPBIOS_table *)(uintptr_t)BIOS_PADDRTOVADDR(sigaddr);
for (cv = (u_int8_t *)pt, ck = 0, i = 0; i < pt->len; i++) {
@ -188,7 +185,6 @@ bios32_SDlookup(struct bios32_SDentry *ent)
return (1); /* failed */
}
/*
* bios_sigsearch
*
@ -227,7 +223,6 @@ bios_sigsearch(u_int32_t start, u_char *sig, int siglen, int paralen, int sigofs
/* loop searching */
while ((sp + sigofs + siglen) < end) {
/* compare here */
if (!bcmp(sp + sigofs, sig, siglen)) {
/* convert back to physical address */
@ -272,7 +267,7 @@ set_bios_selectors(struct bios_segments *seg, int flags)
#else
p_gdt = gdt;
#endif
ssd.ssd_base = seg->code32.base;
ssd.ssd_limit = seg->code32.limit;
ssdtosd(&ssd, &p_gdt[GBIOSCODE32_SEL].sd);
@ -619,7 +614,6 @@ pnpbios_identify(driver_t *driver, device_t parent)
pd = &pda->node;
for (currdev = 0, left = ndevs; (currdev != 0xff) && (left > 0); left--) {
bzero(pd, bigdev);
pda->next = currdev;
/* get current configuration */
@ -648,7 +642,7 @@ pnpbios_identify(driver_t *driver, device_t parent)
continue;
if (!strcmp(pnp_eisaformat(pd->devid), "PNP0003")) /* APIC */
continue;
/* Add the device and parse its resources */
dev = BUS_ADD_CHILD(parent, ISA_ORDER_PNPBIOS, NULL, -1);
isa_set_vendorid(dev, pd->devid);
@ -718,7 +712,6 @@ pnpbios_identify(driver_t *driver, device_t parent)
static device_method_t pnpbios_methods[] = {
/* Device interface */
DEVMETHOD(device_identify, pnpbios_identify),
{ 0, 0 }
};

View File

@ -1346,7 +1346,6 @@ db_disasm(db_addr_t loc, bool altfmt)
db_printf(",");
switch (i_mode & 0xFF) {
case E:
db_print_address(seg, size, &address);
break;

View File

@ -678,7 +678,6 @@ i386_set_watch(watchnum, watchaddr, size, access, d)
return (watchnum);
}
int
i386_clr_watch(watchnum, d)
int watchnum;
@ -694,7 +693,6 @@ i386_clr_watch(watchnum, d)
return (0);
}
int
db_md_set_watchpoint(addr, size)
db_expr_t addr;
@ -732,7 +730,6 @@ db_md_set_watchpoint(addr, size)
return(0);
}
int
db_md_clr_watchpoint(addr, size)
db_expr_t addr;
@ -748,7 +745,6 @@ db_md_clr_watchpoint(addr, size)
if ((DBREG_DRX((&d), i) >= addr) &&
(DBREG_DRX((&d), i) < addr+size))
i386_clr_watch(i, &d);
}
}
@ -757,7 +753,6 @@ db_md_clr_watchpoint(addr, size)
return(0);
}
static const char *
watchtype_str(type)
int type;
@ -770,7 +765,6 @@ watchtype_str(type)
}
}
void
db_md_list_watchpoints(void)
{

View File

@ -347,7 +347,7 @@ init_AMD_Elan_sc520(void)
* f = 32768 * 45 * 25 / 31 = 1189161.29...
* We use the sysctl to get the i8254 (timecounter etc) into whack.
*/
new = 1189161;
i = kernel_sysctlbyname(&thread0, "machdep.i8254_freq",
NULL, 0, &new, sizeof new, NULL, 0);
@ -497,7 +497,7 @@ elan_drvinit(void)
/* Create the error LED on GPIO9 */
led_cookie[9] = 0x02000c34;
led_dev[9] = led_create(gpio_led, &led_cookie[9], "error");
/* Disable the unavailable GPIO pins */
strcpy(gpio_config, "-----....--..--------..---------");
#else /* !CPU_SOEKRIS */
@ -509,4 +509,3 @@ elan_drvinit(void)
}
SYSINIT(elan, SI_SUB_PSEUDO, SI_ORDER_MIDDLE, elan_drvinit, NULL);

View File

@ -209,7 +209,6 @@ elf_reloc_internal(linker_file_t lf, Elf_Addr relocbase, const void *data,
}
switch (rtype) {
case R_386_NONE: /* none */
break;

View File

@ -140,7 +140,6 @@ cs5536_led_func(void *ptr, int onoff)
outl(a, 1 << (bit + 16));
}
static unsigned
geode_get_timecount(struct timecounter *tc)
{
@ -374,7 +373,7 @@ static device_method_t geode_methods[] = {
DEVMETHOD(device_shutdown, bus_generic_shutdown),
{0, 0}
};
static driver_t geode_driver = {
"geode",
geode_methods,

View File

@ -159,7 +159,6 @@ init_486dlc(void)
intr_restore(saveintr);
}
/*
* Cyrix 486S/DX series
*/
@ -181,7 +180,6 @@ init_cy486dx(void)
intr_restore(saveintr);
}
/*
* Cyrix 5x86
*/
@ -960,7 +958,6 @@ DB_SHOW_COMMAND(cyrixreg, cyrixreg)
if (cpu_vendor_id == CPU_VENDOR_CYRIX) {
saveintr = intr_disable();
if ((cpu != CPU_M1SC) && (cpu != CPU_CY486DX)) {
ccr0 = read_cyrix_reg(CCR0);
}

View File

@ -1667,7 +1667,7 @@ add_physmap_entry(uint64_t base, uint64_t length, vm_paddr_t *physmap,
int i, insert_idx, physmap_idx;
physmap_idx = *physmap_idxp;
if (length == 0)
return (1);
@ -2151,7 +2151,7 @@ getmemsize(int first)
}
}
pmap_cmap3(0, 0);
/*
* XXX
* The last chunk must contain at least one page plus the message

View File

@ -128,7 +128,6 @@ memrw(struct cdev *dev, struct uio *uio, int flags)
pa = pmap_extract(kernel_pmap, addr);
if (pa == 0)
return EFAULT;
}
/*
@ -185,7 +184,7 @@ memioctl(struct cdev *dev __unused, u_long cmd, caddr_t data, int flags,
int nd, error = 0;
struct mem_range_op *mo = (struct mem_range_op *)data;
struct mem_range_desc *md;
/* is this for us? */
if ((cmd != MEMRANGE_GET) &&
(cmd != MEMRANGE_SET))

View File

@ -82,4 +82,3 @@ minidumpsys(struct dumperinfo *di)
return (pae_mode ? minidumpsys_pae(di) : minidumpsys_nopae(di));
}

View File

@ -63,7 +63,6 @@ static struct timecounter piix_timecounter = {
"PIIX" /* name */
};
static int
sysctl_machdep_piix_freq(SYSCTL_HANDLER_ARGS)
{

View File

@ -289,7 +289,7 @@ init_secondary(void)
cr0 &= ~(CR0_CD | CR0_NW | CR0_EM);
load_cr0(cr0);
CHECK_WRITE(0x38, 5);
/* signal our startup to the BSP. */
mp_naps++;
CHECK_WRITE(0x39, 6);

View File

@ -440,7 +440,7 @@ npxinit(bool bsp)
*/
if (bsp)
npxinit_bsp2();
/*
* fninit has the same h/w bugs as fnsave. Use the detoxified
* fnsave to throw away any junk in the fpu. fpusave() initializes
@ -1324,7 +1324,6 @@ static device_method_t npxisa_methods[] = {
DEVMETHOD(device_shutdown, bus_generic_shutdown),
DEVMETHOD(device_suspend, bus_generic_suspend),
DEVMETHOD(device_resume, bus_generic_resume),
{ 0, 0 }
};

View File

@ -675,7 +675,6 @@ __CONCAT(PMTYPE, bootstrap)(vm_paddr_t firstaddr)
va = virtual_avail;
pte = vtopte(va);
/*
* Initialize temporary map objects on the current CPU for use
* during early boot.
@ -788,7 +787,7 @@ pmap_init_reserved_pages(void)
pc->pc_qmap_addr = pages + ptoa(2);
}
}
SYSINIT(rpages_init, SI_SUB_CPU, SI_ORDER_ANY, pmap_init_reserved_pages, NULL);
/*
@ -962,7 +961,6 @@ pmap_ptelist_init(vm_offset_t *head, void *base, int npages)
}
}
/*
* Initialize the pmap module.
* Called by vm_init, to initialize any structures that the pmap
@ -1854,7 +1852,6 @@ __CONCAT(PMTYPE, map)(vm_offset_t *virt, vm_paddr_t start, vm_paddr_t end,
return (sva);
}
/*
* Add a list of wired pages to the kva
* this routine is only used for temporary
@ -2211,7 +2208,6 @@ pmap_allocpte(pmap_t pmap, vm_offset_t va, u_int flags)
return (m);
}
/***************************************************
* Pmap allocation/deallocation routines.
***************************************************/
@ -2295,7 +2291,6 @@ __CONCAT(PMTYPE, growkernel)(vm_offset_t addr)
}
}
/***************************************************
* page management routines.
***************************************************/
@ -2891,7 +2886,7 @@ pmap_demote_pde(pmap_t pmap, pd_entry_t *pde, vm_offset_t va)
*/
if ((*firstpte & PG_PTE_PROMOTE) != (newpte & PG_PTE_PROMOTE))
pmap_fill_ptp(firstpte, newpte);
/*
* Demote the mapping. This pmap is locked. The old PDE has
* PG_A set. If the old PDE has PG_RW set, it also has PG_M
@ -4381,7 +4376,6 @@ __CONCAT(PMTYPE, unwire)(pmap_t pmap, vm_offset_t sva, vm_offset_t eva)
PMAP_UNLOCK(pmap);
}
/*
* Copy the range specified by src_addr/len
* from the source map to the range dst_addr/len

View File

@ -269,7 +269,6 @@ SYSCTL_OID(_vm_pmap, OID_AUTO, kernel_maps,
NULL, 0, sysctl_kmaps, "A",
"Dump kernel address layout");
/*
* Initialize a vm_page's machine-dependent fields.
*/

View File

@ -473,7 +473,7 @@ user_ldt_alloc(struct mdproc *mdp, int len)
len * sizeof(union descriptor));
} else
bcopy(ldt, new_ldt->ldt_base, sizeof(union descriptor) * NLDT);
return (new_ldt);
}

View File

@ -283,7 +283,6 @@ vm86_emulate(struct vm86frame *vmf)
vmf->vmf_eflags &= ~PSL_VIF;
}
return (retcode);
}
return (SIGBUS);
}
@ -808,7 +807,7 @@ vm86_getptr(struct vm86context *vmc, vm_offset_t kva, u_short *sel,
}
return (0);
}
int
vm86_sysarch(struct thread *td, char *args)
{
@ -843,7 +842,7 @@ vm86_sysarch(struct thread *td, char *args)
#if 0
case VM86_SET_VME: {
struct vm86_vme_args sa;
if ((cpu_feature & CPUID_VME) == 0)
return (ENODEV);

View File

@ -165,7 +165,7 @@
pushl $0 /* dummy trap type */
PUSH_FRAME2
.endm
/*
* Access per-CPU data.
*/

View File

@ -166,4 +166,3 @@ struct w_sigcache {
};
#endif /* _CHIPS_WAVELAN_H */

View File

@ -35,7 +35,6 @@
* $FreeBSD$
*/
#ifndef _I386_INCLUDE_PARAM_H_
#define _I386_INCLUDE_PARAM_H_
@ -45,7 +44,6 @@
* Machine dependent constants for Intel 386.
*/
#define __HAVE_ACPI
#define __HAVE_PIR
#define __PCI_REROUTE_INTERRUPT

View File

@ -36,7 +36,7 @@
#ifndef _MACHINE_PERFMON_H_
#define _MACHINE_PERFMON_H_
#ifndef _KERNEL
#include <sys/types.h>
#endif

View File

@ -67,7 +67,6 @@
#define PG_PDE_PAT 0x1000 /* PAT PAT index */
#define PG_NX (1ull<<63) /* No-execute */
/* Our various interpretations of the above */
#define PG_W PG_AVAIL1 /* "Wired" pseudoflag */
#define PG_MANAGED PG_AVAIL2

View File

@ -58,7 +58,7 @@ struct smapi_bios_header {
u_int32_t prot32_offset;
u_int32_t prot32_segment;
} __packed;
struct smapi_bios_parameter {

View File

@ -37,7 +37,6 @@
* $FreeBSD$
*/
#ifndef _MACHINE_VMPARAM_H_
#define _MACHINE_VMPARAM_H_ 1

View File

@ -261,7 +261,7 @@ HYPERVISOR_update_va_mapping(
lo = (uint32_t)(new_val & 0xffffffff);
hi = (uint32_t)(new_val >> 32);
return _hypercall4(int, update_va_mapping, va,
lo, hi, flags);
}
@ -327,10 +327,10 @@ HYPERVISOR_update_va_mapping_otherdomain(
unsigned long va, uint64_t new_val, unsigned long flags, domid_t domid)
{
uint32_t hi, lo;
lo = (uint32_t)(new_val & 0xffffffff);
hi = (uint32_t)(new_val >> 32);
return _hypercall5(int, update_va_mapping_otherdomain, va,
lo, hi, flags, domid);
}

View File

@ -7,7 +7,6 @@
* when communicating with Xen or other guest OSes running on other CPUs.
*/
#define ADDR (*(volatile long *) addr)
static __inline__ void synch_set_bit(int nr, volatile void * addr)

View File

@ -508,7 +508,6 @@ struct l_desc_struct {
unsigned long a, b;
};
#define LINUX_LOWERWORD 0x0000ffff
/*

View File

@ -96,7 +96,6 @@ struct l_old_select_argv {
struct l_timeval *timeout;
};
int
linux_execve(struct thread *td, struct linux_execve_args *args)
{

View File

@ -1937,42 +1937,36 @@ int linux_io_uring_register(struct thread *, struct linux_io_uring_register_args
#endif /* COMPAT_43 */
#ifdef COMPAT_FREEBSD4
#define nosys linux_nosys
#endif /* COMPAT_FREEBSD4 */
#ifdef COMPAT_FREEBSD6
#define nosys linux_nosys
#endif /* COMPAT_FREEBSD6 */
#ifdef COMPAT_FREEBSD7
#define nosys linux_nosys
#endif /* COMPAT_FREEBSD7 */
#ifdef COMPAT_FREEBSD10
#define nosys linux_nosys
#endif /* COMPAT_FREEBSD10 */
#ifdef COMPAT_FREEBSD11
#define nosys linux_nosys
#endif /* COMPAT_FREEBSD11 */
#ifdef COMPAT_FREEBSD12
#define nosys linux_nosys

View File

@ -493,7 +493,6 @@ linux_rt_sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask)
mtx_lock(&psp->ps_mtx);
}
/*
* Send an interrupt to process.
*

View File

@ -405,7 +405,6 @@ pcireg_cfgopen(void)
}
if ((oldval2 & 0xf0) == 0) {
cfgmech = CFGMECH_2;
devmax = 16;
@ -466,7 +465,6 @@ pcie_cfgregopen(uint64_t base, uint8_t minbus, uint8_t maxbus)
STAILQ_FOREACH(pc, &cpuhead, pc_allcpu)
#endif
{
pcie_array = malloc(sizeof(struct pcie_cfg_elem) * PCIE_CACHE,
M_DEVBUF, M_NOWAIT);
if (pcie_array == NULL)

View File

@ -481,7 +481,6 @@ pci_pir_biosroute(int bus, int device, int func, int pin, int irq)
return (bios32(&args, PCIbios.ventry, GSEL(GCODE_SEL, SEL_KPL)));
}
/*
* Route a PCI interrupt using a link device from the $PIR.
*/
@ -732,7 +731,6 @@ static device_method_t pir_methods[] = {
DEVMETHOD(device_probe, pir_probe),
DEVMETHOD(device_attach, pir_attach),
DEVMETHOD(device_resume, pir_resume),
{ 0, 0 }
};