git: 1cc76bb620af - stable/13 - bhyve: clean up trailing whitespaces
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 26 Jan 2023 19:25:47 UTC
The branch stable/13 has been updated by jhb:
URL: https://cgit.FreeBSD.org/src/commit/?id=1cc76bb620af9aeb2cdbd9b1e6c9561dd1452057
commit 1cc76bb620af9aeb2cdbd9b1e6c9561dd1452057
Author: Toomas Soome <tsoome@FreeBSD.org>
AuthorDate: 2021-12-26 07:52:38 +0000
Commit: John Baldwin <jhb@FreeBSD.org>
CommitDate: 2023-01-26 19:18:04 +0000
bhyve: clean up trailing whitespaces
Clean up trailing whitespaces. No functional changes.
Reviewed by: jhb
Differential Revision: https://reviews.freebsd.org/D33681
(cherry picked from commit c2fa905cf6c1cf1938a0353679e3bd0b617ca179)
---
usr.sbin/bhyve/acpi.c | 4 ++--
usr.sbin/bhyve/audio.h | 2 +-
usr.sbin/bhyve/bhyverun.c | 4 ++--
usr.sbin/bhyve/block_if.c | 2 +-
usr.sbin/bhyve/config.c | 2 +-
usr.sbin/bhyve/config.h | 2 +-
usr.sbin/bhyve/fwctl.c | 2 +-
usr.sbin/bhyve/hda_reg.h | 26 +++++++++++-----------
usr.sbin/bhyve/inout.c | 4 ++--
usr.sbin/bhyve/inout.h | 2 +-
usr.sbin/bhyve/mem.c | 14 ++++++------
usr.sbin/bhyve/mevent.c | 8 +++----
usr.sbin/bhyve/mevent.h | 2 +-
usr.sbin/bhyve/mevent_test.c | 2 +-
usr.sbin/bhyve/mptbl.c | 6 ++---
usr.sbin/bhyve/net_backends.c | 2 +-
usr.sbin/bhyve/pci_ahci.c | 4 ++--
usr.sbin/bhyve/pci_e82545.c | 44 ++++++++++++++++++-------------------
usr.sbin/bhyve/pci_emul.c | 6 ++---
usr.sbin/bhyve/pci_emul.h | 10 ++++-----
usr.sbin/bhyve/pci_fbuf.c | 2 +-
usr.sbin/bhyve/pci_hda.h | 2 +-
usr.sbin/bhyve/pci_lpc.c | 2 +-
usr.sbin/bhyve/pci_nvme.c | 10 ++++-----
usr.sbin/bhyve/pci_passthru.c | 18 +++++++--------
usr.sbin/bhyve/pci_virtio_9p.c | 4 ++--
usr.sbin/bhyve/pci_virtio_console.c | 4 ++--
usr.sbin/bhyve/pci_virtio_net.c | 14 ++++++------
usr.sbin/bhyve/pci_virtio_scsi.c | 2 +-
usr.sbin/bhyve/pci_xhci.c | 18 +++++++--------
usr.sbin/bhyve/ps2mouse.h | 2 +-
usr.sbin/bhyve/rtc.c | 2 +-
usr.sbin/bhyve/uart_emul.c | 10 ++++-----
usr.sbin/bhyve/usb_mouse.c | 6 ++---
34 files changed, 122 insertions(+), 122 deletions(-)
diff --git a/usr.sbin/bhyve/acpi.c b/usr.sbin/bhyve/acpi.c
index 6cfd4462526a..bdb0e97076ad 100644
--- a/usr.sbin/bhyve/acpi.c
+++ b/usr.sbin/bhyve/acpi.c
@@ -342,7 +342,7 @@ basl_compile(struct vmctx *ctx, int (*fwrite_section)(FILE *))
fmt = basl_verbose_iasl ?
"%s -p %s %s" :
"/bin/sh -c \"%s -p %s %s\" 1> /dev/null";
-
+
snprintf(iaslbuf, sizeof(iaslbuf),
fmt,
BHYVE_ASL_COMPILER,
@@ -373,7 +373,7 @@ basl_make_templates(void)
err = 0;
/*
- *
+ *
*/
if ((tmpdir = getenv("BHYVE_TMPDIR")) == NULL || *tmpdir == '\0' ||
(tmpdir = getenv("TMPDIR")) == NULL || *tmpdir == '\0') {
diff --git a/usr.sbin/bhyve/audio.h b/usr.sbin/bhyve/audio.h
index f433fe29af72..143030b29ae7 100644
--- a/usr.sbin/bhyve/audio.h
+++ b/usr.sbin/bhyve/audio.h
@@ -28,7 +28,7 @@
* $FreeBSD$
*/
-#ifndef _AUDIO_EMUL_H_
+#ifndef _AUDIO_EMUL_H_
#define _AUDIO_EMUL_H_
#include <sys/types.h>
diff --git a/usr.sbin/bhyve/bhyverun.c b/usr.sbin/bhyve/bhyverun.c
index 2aa96039f2fc..4c2c07b934a7 100644
--- a/usr.sbin/bhyve/bhyverun.c
+++ b/usr.sbin/bhyve/bhyverun.c
@@ -1143,7 +1143,7 @@ do_open(const char *vmname)
if (vm_limit_rights(ctx) != 0)
err(EX_OSERR, "vm_limit_rights");
#endif
-
+
if (reinit) {
error = vm_reinit(ctx);
if (error) {
@@ -1384,7 +1384,7 @@ main(int argc, char *argv[])
set_config_bool("x86.mptable", false);
break;
case 'h':
- usage(0);
+ usage(0);
default:
usage(1);
}
diff --git a/usr.sbin/bhyve/block_if.c b/usr.sbin/bhyve/block_if.c
index 7cfaf4c7a40e..8ed95300a13c 100644
--- a/usr.sbin/bhyve/block_if.c
+++ b/usr.sbin/bhyve/block_if.c
@@ -120,7 +120,7 @@ struct blockif_ctxt {
struct mevent *bc_resize_event;
/* Request elements and free/pending/busy queues */
- TAILQ_HEAD(, blockif_elem) bc_freeq;
+ TAILQ_HEAD(, blockif_elem) bc_freeq;
TAILQ_HEAD(, blockif_elem) bc_pendq;
TAILQ_HEAD(, blockif_elem) bc_busyq;
struct blockif_elem bc_reqs[BLOCKIF_MAXREQ];
diff --git a/usr.sbin/bhyve/config.c b/usr.sbin/bhyve/config.c
index e302f919adab..6339ddb9f2ee 100644
--- a/usr.sbin/bhyve/config.c
+++ b/usr.sbin/bhyve/config.c
@@ -256,7 +256,7 @@ _expand_config_value(const char *value, int depth)
fputc('%', valfp);
vp++;
break;
- }
+ }
if (vp[1] != '(' || vp[2] == '\0')
cp = NULL;
else
diff --git a/usr.sbin/bhyve/config.h b/usr.sbin/bhyve/config.h
index 1762b29c2f6d..a7e4b6d03a5c 100644
--- a/usr.sbin/bhyve/config.h
+++ b/usr.sbin/bhyve/config.h
@@ -45,7 +45,7 @@
* Configuration variables are stored in a tree. The full path of a
* variable is specified as a dot-separated name similar to sysctl(8)
* OIDs.
- */
+ */
/*
* Fetches the value of a configuration variable. If the "raw" value
diff --git a/usr.sbin/bhyve/fwctl.c b/usr.sbin/bhyve/fwctl.c
index b39d408df369..7027e34a77f0 100644
--- a/usr.sbin/bhyve/fwctl.c
+++ b/usr.sbin/bhyve/fwctl.c
@@ -98,7 +98,7 @@ fwctl_send_rest(uint32_t *data, size_t len)
int i;
cdata = (uint8_t *) data;
- u.w = 0;
+ u.w = 0;
for (i = 0, u.w = 0; i < len; i++)
u.c[i] = *cdata++;
diff --git a/usr.sbin/bhyve/hda_reg.h b/usr.sbin/bhyve/hda_reg.h
index b3034bf9f417..c309056c6f5d 100644
--- a/usr.sbin/bhyve/hda_reg.h
+++ b/usr.sbin/bhyve/hda_reg.h
@@ -668,7 +668,7 @@
/* Channel Count Control */
#define HDA_CMD_VERB_GET_CONV_CHAN_COUNT 0xf2d
-#define HDA_CMD_VERB_SET_CONV_CHAN_COUNT 0x72d
+#define HDA_CMD_VERB_SET_CONV_CHAN_COUNT 0x72d
#define HDA_CMD_GET_CONV_CHAN_COUNT(cad, nid) \
(HDA_CMD_12BIT((cad), (nid), \
@@ -677,20 +677,20 @@
(HDA_CMD_12BIT((cad), (nid), \
HDA_CMD_VERB_SET_CONV_CHAN_COUNT, (payload)))
-#define HDA_CMD_VERB_GET_HDMI_DIP_SIZE 0xf2e
+#define HDA_CMD_VERB_GET_HDMI_DIP_SIZE 0xf2e
#define HDA_CMD_GET_HDMI_DIP_SIZE(cad, nid, arg) \
(HDA_CMD_12BIT((cad), (nid), \
HDA_CMD_VERB_GET_HDMI_DIP_SIZE, (arg)))
-#define HDA_CMD_VERB_GET_HDMI_ELDD 0xf2f
+#define HDA_CMD_VERB_GET_HDMI_ELDD 0xf2f
#define HDA_CMD_GET_HDMI_ELDD(cad, nid, off) \
(HDA_CMD_12BIT((cad), (nid), \
HDA_CMD_VERB_GET_HDMI_ELDD, (off)))
-#define HDA_CMD_VERB_GET_HDMI_DIP_INDEX 0xf30
-#define HDA_CMD_VERB_SET_HDMI_DIP_INDEX 0x730
+#define HDA_CMD_VERB_GET_HDMI_DIP_INDEX 0xf30
+#define HDA_CMD_VERB_SET_HDMI_DIP_INDEX 0x730
#define HDA_CMD_GET_HDMI_DIP_INDEX(cad, nid) \
(HDA_CMD_12BIT((cad), (nid), \
@@ -699,8 +699,8 @@
(HDA_CMD_12BIT((cad), (nid), \
HDA_CMD_VERB_SET_HDMI_DIP_INDEX, (payload)))
-#define HDA_CMD_VERB_GET_HDMI_DIP_DATA 0xf31
-#define HDA_CMD_VERB_SET_HDMI_DIP_DATA 0x731
+#define HDA_CMD_VERB_GET_HDMI_DIP_DATA 0xf31
+#define HDA_CMD_VERB_SET_HDMI_DIP_DATA 0x731
#define HDA_CMD_GET_HDMI_DIP_DATA(cad, nid) \
(HDA_CMD_12BIT((cad), (nid), \
@@ -709,8 +709,8 @@
(HDA_CMD_12BIT((cad), (nid), \
HDA_CMD_VERB_SET_HDMI_DIP_DATA, (payload)))
-#define HDA_CMD_VERB_GET_HDMI_DIP_XMIT 0xf32
-#define HDA_CMD_VERB_SET_HDMI_DIP_XMIT 0x732
+#define HDA_CMD_VERB_GET_HDMI_DIP_XMIT 0xf32
+#define HDA_CMD_VERB_SET_HDMI_DIP_XMIT 0x732
#define HDA_CMD_GET_HDMI_DIP_XMIT(cad, nid) \
(HDA_CMD_12BIT((cad), (nid), \
@@ -719,11 +719,11 @@
(HDA_CMD_12BIT((cad), (nid), \
HDA_CMD_VERB_SET_HDMI_DIP_XMIT, (payload)))
-#define HDA_CMD_VERB_GET_HDMI_CP_CTRL 0xf33
-#define HDA_CMD_VERB_SET_HDMI_CP_CTRL 0x733
+#define HDA_CMD_VERB_GET_HDMI_CP_CTRL 0xf33
+#define HDA_CMD_VERB_SET_HDMI_CP_CTRL 0x733
-#define HDA_CMD_VERB_GET_HDMI_CHAN_SLOT 0xf34
-#define HDA_CMD_VERB_SET_HDMI_CHAN_SLOT 0x734
+#define HDA_CMD_VERB_GET_HDMI_CHAN_SLOT 0xf34
+#define HDA_CMD_VERB_SET_HDMI_CHAN_SLOT 0x734
#define HDA_CMD_GET_HDMI_CHAN_SLOT(cad, nid) \
(HDA_CMD_12BIT((cad), (nid), \
diff --git a/usr.sbin/bhyve/inout.c b/usr.sbin/bhyve/inout.c
index 1fba90945afb..b65d273f4320 100644
--- a/usr.sbin/bhyve/inout.c
+++ b/usr.sbin/bhyve/inout.c
@@ -86,11 +86,11 @@ default_inout(struct vmctx *ctx, int vcpu, int in, int port, int bytes,
return (0);
}
-static void
+static void
register_default_iohandler(int start, int size)
{
struct inout_port iop;
-
+
VERIFY_IOPORT(start, size);
bzero(&iop, sizeof(iop));
diff --git a/usr.sbin/bhyve/inout.h b/usr.sbin/bhyve/inout.h
index afbae34c2dd0..19b2975b94e5 100644
--- a/usr.sbin/bhyve/inout.h
+++ b/usr.sbin/bhyve/inout.h
@@ -70,7 +70,7 @@ struct inout_port {
0 \
}; \
DATA_SET(inout_port_set, __CONCAT(__inout_port, __LINE__))
-
+
void init_inout(void);
int emulate_inout(struct vmctx *, int vcpu, struct vm_exit *vmexit);
int register_inout(struct inout_port *iop);
diff --git a/usr.sbin/bhyve/mem.c b/usr.sbin/bhyve/mem.c
index 0ea9c56192c6..10cc7bbaa7fc 100644
--- a/usr.sbin/bhyve/mem.c
+++ b/usr.sbin/bhyve/mem.c
@@ -97,7 +97,7 @@ mmio_rb_lookup(struct mmio_rb_tree *rbt, uint64_t addr,
*entry = res;
return (0);
}
-
+
return (ENOENT);
}
@@ -173,7 +173,7 @@ access_memory(struct vmctx *ctx, int vcpu, uint64_t paddr, mem_cb_t *cb,
{
struct mmio_rb_range *entry;
int err, perror, immutable;
-
+
pthread_rwlock_rdlock(&mmio_rwlock);
/*
* First check the per-vCPU cache
@@ -188,7 +188,7 @@ access_memory(struct vmctx *ctx, int vcpu, uint64_t paddr, mem_cb_t *cb,
if (entry == NULL) {
if (mmio_rb_lookup(&mmio_rb_root, paddr, &entry) == 0) {
/* Update the per-vCPU cache */
- mmio_hint[vcpu] = entry;
+ mmio_hint[vcpu] = entry;
} else if (mmio_rb_lookup(&mmio_rb_fallback, paddr, &entry)) {
perror = pthread_rwlock_unlock(&mmio_rwlock);
assert(perror == 0);
@@ -336,19 +336,19 @@ register_mem_fallback(struct mem_range *memp)
return (register_mem_int(&mmio_rb_fallback, memp));
}
-int
+int
unregister_mem(struct mem_range *memp)
{
struct mem_range *mr;
struct mmio_rb_range *entry = NULL;
int err, perror, i;
-
+
pthread_rwlock_wrlock(&mmio_rwlock);
err = mmio_rb_lookup(&mmio_rb_root, memp->base, &entry);
if (err == 0) {
mr = &entry->mr_param;
assert(mr->name == memp->name);
- assert(mr->base == memp->base && mr->size == memp->size);
+ assert(mr->base == memp->base && mr->size == memp->size);
assert((mr->flags & MEM_F_IMMUTABLE) == 0);
RB_REMOVE(mmio_rb_tree, &mmio_rb_root, entry);
@@ -363,7 +363,7 @@ unregister_mem(struct mem_range *memp)
if (entry)
free(entry);
-
+
return (err);
}
diff --git a/usr.sbin/bhyve/mevent.c b/usr.sbin/bhyve/mevent.c
index 5170251e008b..b7749ed67745 100644
--- a/usr.sbin/bhyve/mevent.c
+++ b/usr.sbin/bhyve/mevent.c
@@ -29,7 +29,7 @@
*/
/*
- * Micro event library for FreeBSD, designed for a single i/o thread
+ * Micro event library for FreeBSD, designed for a single i/o thread
* using kqueue, and having events be persistent by default.
*/
@@ -117,7 +117,7 @@ static void
mevent_notify(void)
{
char c = '\0';
-
+
/*
* If calling from outside the i/o thread, write a byte on the
* pipe to force the i/o thread to exit the blocking kevent call.
@@ -546,10 +546,10 @@ mevent_dispatch(void)
if (ret == -1 && errno != EINTR) {
perror("Error return from kevent monitor");
}
-
+
/*
* Handle reported events
*/
mevent_handle(eventlist, ret);
- }
+ }
}
diff --git a/usr.sbin/bhyve/mevent.h b/usr.sbin/bhyve/mevent.h
index a26293867a09..8c3db9db54a0 100644
--- a/usr.sbin/bhyve/mevent.h
+++ b/usr.sbin/bhyve/mevent.h
@@ -44,7 +44,7 @@ enum ev_type {
struct mevent;
-struct mevent *mevent_add(int fd, enum ev_type type,
+struct mevent *mevent_add(int fd, enum ev_type type,
void (*func)(int, enum ev_type, void *),
void *param);
struct mevent *mevent_add_flags(int fd, enum ev_type type, int fflags,
diff --git a/usr.sbin/bhyve/mevent_test.c b/usr.sbin/bhyve/mevent_test.c
index 3a7aac98a65c..eda1c100e8a3 100644
--- a/usr.sbin/bhyve/mevent_test.c
+++ b/usr.sbin/bhyve/mevent_test.c
@@ -111,7 +111,7 @@ timer_callback(int fd, enum ev_type type, void *param)
#ifdef MEVENT_ECHO
struct esync {
pthread_mutex_t e_mt;
- pthread_cond_t e_cond;
+ pthread_cond_t e_cond;
};
static void
diff --git a/usr.sbin/bhyve/mptbl.c b/usr.sbin/bhyve/mptbl.c
index e57c6daf9dd0..56582256a857 100644
--- a/usr.sbin/bhyve/mptbl.c
+++ b/usr.sbin/bhyve/mptbl.c
@@ -180,7 +180,7 @@ mpt_build_bus_entries(bus_entry_ptr mpeb)
memset(mpeb, 0, sizeof(*mpeb));
mpeb->type = MPCT_ENTRY_BUS;
- mpeb->bus_id = 1;
+ mpeb->bus_id = 1;
memcpy(mpeb->bus_type, MPE_BUSNAME_ISA, MPE_BUSNAME_LEN);
}
@@ -243,7 +243,7 @@ mpt_build_ioint_entries(int_entry_ptr mpie, int id)
/*
* The following config is taken from kernel mptable.c
- * mptable_parse_default_config_ints(...), for now
+ * mptable_parse_default_config_ints(...), for now
* just use the default config, tweek later if needed.
*/
@@ -287,7 +287,7 @@ mpt_build_ioint_entries(int_entry_ptr mpie, int id)
/* Next, generate entries for any PCI INTx interrupts. */
for (bus = 0; bus <= PCI_BUSMAX; bus++)
- pci_walk_lintr(bus, mpt_generate_pci_int, &mpie);
+ pci_walk_lintr(bus, mpt_generate_pci_int, &mpie);
}
void
diff --git a/usr.sbin/bhyve/net_backends.c b/usr.sbin/bhyve/net_backends.c
index cc2a06592429..8440b801ce6a 100644
--- a/usr.sbin/bhyve/net_backends.c
+++ b/usr.sbin/bhyve/net_backends.c
@@ -527,7 +527,7 @@ ng_init(struct net_backend *be, const char *devname,
/*
* The default ng_socket(4) buffer's size is too low.
* Calculate the minimum value between NG_SBUF_MAX_SIZE
- * and kern.ipc.maxsockbuf.
+ * and kern.ipc.maxsockbuf.
*/
msbsz = sizeof(maxsbsz);
if (sysctlbyname("kern.ipc.maxsockbuf", &maxsbsz, &msbsz,
diff --git a/usr.sbin/bhyve/pci_ahci.c b/usr.sbin/bhyve/pci_ahci.c
index 5a2a06029fc9..f63ebd842757 100644
--- a/usr.sbin/bhyve/pci_ahci.c
+++ b/usr.sbin/bhyve/pci_ahci.c
@@ -1935,7 +1935,7 @@ ata_ioreq_cb(struct blockif_req *br, int err)
if (!err && aior->more) {
if (dsm)
ahci_handle_dsm_trim(p, slot, cfis, aior->done);
- else
+ else
ahci_handle_rw(p, slot, cfis, aior->done);
goto out;
}
@@ -2468,7 +2468,7 @@ pci_ahci_init(struct vmctx *ctx, struct pci_devinst *pi, nvlist_t *nvl)
sc->ports = p;
ret = 1;
goto open_fail;
- }
+ }
sc->port[p].bctx = bctxt;
sc->port[p].pr_sc = sc;
sc->port[p].port = p;
diff --git a/usr.sbin/bhyve/pci_e82545.c b/usr.sbin/bhyve/pci_e82545.c
index 9a7fb13ae3c2..a38edef72e20 100644
--- a/usr.sbin/bhyve/pci_e82545.c
+++ b/usr.sbin/bhyve/pci_e82545.c
@@ -264,7 +264,7 @@ struct e82545_softc {
uint32_t esc_FCTTV; /* x0170 flow ctl tx timer */
uint32_t esc_LEDCTL; /* x0E00 LED control */
uint32_t esc_PBA; /* x1000 pkt buffer allocation */
-
+
/* Interrupt control */
int esc_irq_asserted;
uint32_t esc_ICR; /* x00C0 cause read/clear */
@@ -294,12 +294,12 @@ struct e82545_softc {
uint32_t esc_TIDV; /* x3820 intr delay */
uint32_t esc_TXDCTL; /* x3828 desc control */
uint32_t esc_TADV; /* x382C intr absolute delay */
-
+
/* L2 frame acceptance */
struct eth_uni esc_uni[16]; /* 16 x unicast MAC addresses */
uint32_t esc_fmcast[128]; /* Multicast filter bit-match */
uint32_t esc_fvlan[128]; /* VLAN 4096-bit filter */
-
+
/* Receive */
struct e1000_rx_desc *esc_rxdesc;
pthread_cond_t esc_rx_cond;
@@ -320,7 +320,7 @@ struct e82545_softc {
uint32_t esc_RADV; /* x282C intr absolute delay */
uint32_t esc_RSRPD; /* x2C00 recv small packet detect */
uint32_t esc_RXCSUM; /* x5000 receive cksum ctl */
-
+
/* IO Port register access */
uint32_t io_addr;
@@ -578,7 +578,7 @@ e82545_icr_assert(struct e82545_softc *sc, uint32_t bits)
uint32_t new;
DPRINTF("icr assert: 0x%x", bits);
-
+
/*
* An interrupt is only generated if bits are set that
* aren't already in the ICR, these bits are unmasked,
@@ -654,7 +654,7 @@ e82545_intr_write(struct e82545_softc *sc, uint32_t offset, uint32_t value)
{
DPRINTF("intr_write: off %x, val %x", offset, value);
-
+
switch (offset) {
case E1000_ICR:
e82545_icr_deassert(sc, value);
@@ -688,7 +688,7 @@ e82545_intr_read(struct e82545_softc *sc, uint32_t offset)
retval = 0;
DPRINTF("intr_read: off %x", offset);
-
+
switch (offset) {
case E1000_ICR:
retval = sc->esc_ICR;
@@ -734,10 +734,10 @@ e82545_rx_update_rdba(struct e82545_softc *sc)
/* XXX verify desc base/len within phys mem range */
sc->esc_rdba = (uint64_t)sc->esc_RDBAH << 32 |
sc->esc_RDBAL;
-
+
/* Cache host mapping of guest descriptor array */
sc->esc_rxdesc = paddr_guest2host(sc->esc_ctx,
- sc->esc_rdba, sc->esc_RDLEN);
+ sc->esc_rdba, sc->esc_RDLEN);
}
static void
@@ -792,7 +792,7 @@ static void
e82545_tx_ctl(struct e82545_softc *sc, uint32_t val)
{
int on;
-
+
on = ((val & E1000_TCTL_EN) == E1000_TCTL_EN);
/* ignore TCTL_EN settings that don't change state */
@@ -1028,7 +1028,7 @@ e82545_txdesc_type(uint32_t lower)
int type;
type = 0;
-
+
if (lower & E1000_TXD_CMD_DEXT)
type = lower & E1000_TXD_MASK;
@@ -1615,14 +1615,14 @@ e82545_read_ra(struct e82545_softc *sc, int reg)
eu->eu_eth.octet[0];
}
- return (retval);
+ return (retval);
}
static void
e82545_write_register(struct e82545_softc *sc, uint32_t offset, uint32_t value)
{
int ridx;
-
+
if (offset & 0x3) {
DPRINTF("Unaligned register write offset:0x%x value:0x%x", offset, value);
return;
@@ -1773,7 +1773,7 @@ e82545_write_register(struct e82545_softc *sc, uint32_t offset, uint32_t value)
break;
case E1000_VFTA ... (E1000_VFTA + (127*4)):
sc->esc_fvlan[(offset - E1000_VFTA) >> 2] = value;
- break;
+ break;
case E1000_EECD:
{
//DPRINTF("EECD write 0x%x -> 0x%x", sc->eeprom_control, value);
@@ -1828,7 +1828,7 @@ e82545_write_register(struct e82545_softc *sc, uint32_t offset, uint32_t value)
return;
}
case E1000_MANC:
- case E1000_STATUS:
+ case E1000_STATUS:
return;
default:
DPRINTF("Unknown write register: 0x%x value:%x", offset, value);
@@ -1921,7 +1921,7 @@ e82545_read_register(struct e82545_softc *sc, uint32_t offset)
case E1000_RSRPD:
retval = sc->esc_RSRPD;
break;
- case E1000_RXCSUM:
+ case E1000_RXCSUM:
retval = sc->esc_RXCSUM;
break;
case E1000_TXCW:
@@ -1970,7 +1970,7 @@ e82545_read_register(struct e82545_softc *sc, uint32_t offset)
break;
case E1000_VFTA ... (E1000_VFTA + (127*4)):
retval = sc->esc_fvlan[(offset - E1000_VFTA) >> 2];
- break;
+ break;
case E1000_EECD:
//DPRINTF("EECD read %x", sc->eeprom_control);
retval = sc->eeprom_control;
@@ -2166,7 +2166,7 @@ e82545_read(struct vmctx *ctx, int vcpu, struct pci_devinst *pi, int baridx,
{
struct e82545_softc *sc;
uint64_t retval;
-
+
//DPRINTF("Read bar:%d offset:0x%lx size:%d", baridx, offset, size);
sc = pi->pi_arg;
retval = 0;
@@ -2238,7 +2238,7 @@ e82545_reset(struct e82545_softc *sc, int drvr)
}
sc->esc_LEDCTL = 0x07061302;
sc->esc_PBA = 0x00100030;
-
+
/* start nvm in opcode mode. */
sc->nvm_opaddr = 0;
sc->nvm_mode = E82545_NVM_MODE_OPADDR;
@@ -2252,7 +2252,7 @@ e82545_reset(struct e82545_softc *sc, int drvr)
sc->esc_ICS = 0;
sc->esc_IMS = 0;
sc->esc_IMC = 0;
-
+
/* L2 filters */
if (!drvr) {
memset(sc->esc_fvlan, 0, sizeof(sc->esc_fvlan));
@@ -2268,7 +2268,7 @@ e82545_reset(struct e82545_softc *sc, int drvr)
for (i = 0; i < 16; i++)
sc->esc_uni[i].eu_valid = 0;
}
-
+
/* receive */
if (!drvr) {
sc->esc_RDBAL = 0;
@@ -2336,7 +2336,7 @@ e82545_init(struct vmctx *ctx, struct pci_devinst *pi, nvlist_t *nvl)
pci_set_cfgdata8(pi, PCIR_HDRTYPE, PCIM_HDRTYPE_NORMAL);
pci_set_cfgdata8(pi, PCIR_INTPIN, 0x1);
-
+
/* TODO: this card also supports msi, but the freebsd driver for it
* does not, so I have not implemented it. */
pci_lintr_request(pi);
diff --git a/usr.sbin/bhyve/pci_emul.c b/usr.sbin/bhyve/pci_emul.c
index bf7563871fe6..3d3fc80c6293 100644
--- a/usr.sbin/bhyve/pci_emul.c
+++ b/usr.sbin/bhyve/pci_emul.c
@@ -2549,7 +2549,7 @@ pci_emul_diow(struct vmctx *ctx, int vcpu, struct pci_devinst *pi, int baridx,
} else {
printf("diow: memw unknown size %d\n", size);
}
-
+
/*
* magic interrupt ??
*/
@@ -2574,7 +2574,7 @@ pci_emul_dior(struct vmctx *ctx, int vcpu, struct pci_devinst *pi, int baridx,
offset, size);
return (0);
}
-
+
value = 0;
if (size == 1) {
value = sc->ioregs[offset];
@@ -2593,7 +2593,7 @@ pci_emul_dior(struct vmctx *ctx, int vcpu, struct pci_devinst *pi, int baridx,
offset, size);
return (0);
}
-
+
i = baridx - 1; /* 'memregs' index */
if (size == 1) {
diff --git a/usr.sbin/bhyve/pci_emul.h b/usr.sbin/bhyve/pci_emul.h
index 28f4fc422bee..3d7b420e2bdf 100644
--- a/usr.sbin/bhyve/pci_emul.h
+++ b/usr.sbin/bhyve/pci_emul.h
@@ -113,7 +113,7 @@ struct msix_table_entry {
uint32_t vector_control;
} __packed;
-/*
+/*
* In case the structure is modified to hold extra information, use a define
* for the size that should be emulated.
*/
@@ -159,7 +159,7 @@ struct pci_devinst {
int table_count;
uint32_t pba_offset;
int pba_size;
- int function_mask;
+ int function_mask;
struct msix_table_entry *table; /* allocated at runtime */
uint8_t *mapped_addr;
size_t mapped_size;
@@ -270,21 +270,21 @@ int pci_pause(struct vmctx *ctx, const char *dev_name);
int pci_resume(struct vmctx *ctx, const char *dev_name);
#endif
-static __inline void
+static __inline void
pci_set_cfgdata8(struct pci_devinst *pi, int offset, uint8_t val)
{
assert(offset <= PCI_REGMAX);
*(uint8_t *)(pi->pi_cfgdata + offset) = val;
}
-static __inline void
+static __inline void
pci_set_cfgdata16(struct pci_devinst *pi, int offset, uint16_t val)
{
assert(offset <= (PCI_REGMAX - 1) && (offset & 1) == 0);
*(uint16_t *)(pi->pi_cfgdata + offset) = val;
}
-static __inline void
+static __inline void
pci_set_cfgdata32(struct pci_devinst *pi, int offset, uint32_t val)
{
assert(offset <= (PCI_REGMAX - 3) && (offset & 3) == 0);
diff --git a/usr.sbin/bhyve/pci_fbuf.c b/usr.sbin/bhyve/pci_fbuf.c
index 16f69a097dc4..e772f29770e6 100644
--- a/usr.sbin/bhyve/pci_fbuf.c
+++ b/usr.sbin/bhyve/pci_fbuf.c
@@ -377,7 +377,7 @@ pci_fbuf_init(struct vmctx *ctx, struct pci_devinst *pi, nvlist_t *nvl)
{
int error;
struct pci_fbuf_softc *sc;
-
+
if (fbuf_sc != NULL) {
EPRINTLN("Only one frame buffer device is allowed.");
return (-1);
diff --git a/usr.sbin/bhyve/pci_hda.h b/usr.sbin/bhyve/pci_hda.h
index da473800bd80..e86867192193 100644
--- a/usr.sbin/bhyve/pci_hda.h
+++ b/usr.sbin/bhyve/pci_hda.h
@@ -28,7 +28,7 @@
* $FreeBSD$
*/
-#ifndef _HDA_EMUL_H_
+#ifndef _HDA_EMUL_H_
#define _HDA_EMUL_H_
#include <stdio.h>
diff --git a/usr.sbin/bhyve/pci_lpc.c b/usr.sbin/bhyve/pci_lpc.c
index f430d32dbd49..35f93ded68ec 100644
--- a/usr.sbin/bhyve/pci_lpc.c
+++ b/usr.sbin/bhyve/pci_lpc.c
@@ -173,7 +173,7 @@ lpc_uart_intr_assert(void *arg)
static void
lpc_uart_intr_deassert(void *arg)
{
- /*
+ /*
* The COM devices on the LPC bus generate edge triggered interrupts,
* so nothing more to do here.
*/
diff --git a/usr.sbin/bhyve/pci_nvme.c b/usr.sbin/bhyve/pci_nvme.c
index da19bef1b779..d57014ae4f35 100644
--- a/usr.sbin/bhyve/pci_nvme.c
+++ b/usr.sbin/bhyve/pci_nvme.c
@@ -5,7 +5,7 @@
* Copyright (c) 2018 Leon Dang
* Copyright (c) 2020 Chuck Tuffli
*
- * Function crc16 Copyright (c) 2017, Fedor Uporov
+ * Function crc16 Copyright (c) 2017, Fedor Uporov
* Obtained from function ext2_crc16() in sys/fs/ext2fs/ext2_csum.c
*
* Redistribution and use in source and binary forms, with or without
@@ -846,7 +846,7 @@ pci_nvme_aer_get(struct pci_nvme_softc *sc)
sc->aer_count--;
}
pthread_mutex_unlock(&sc->aer_mtx);
-
+
return (aer);
}
@@ -1111,7 +1111,7 @@ pci_nvme_init_controller(struct vmctx *ctx, struct pci_nvme_softc *sc)
DPRINTF("%s mapping Admin-SQ guest 0x%lx, host: %p",
__func__, sc->regs.asq, sc->submit_queues[0].qbase);
- acqs = ((sc->regs.aqa >> NVME_AQA_REG_ACQS_SHIFT) &
+ acqs = ((sc->regs.aqa >> NVME_AQA_REG_ACQS_SHIFT) &
NVME_AQA_REG_ACQS_MASK) + 1;
sc->compl_queues[0].size = acqs;
sc->compl_queues[0].qbase = vm_map_gpa(ctx, sc->regs.acq,
@@ -1292,7 +1292,7 @@ nvme_opc_create_io_sq(struct pci_nvme_softc* sc, struct nvme_command* command,
DPRINTF("%s completed creating IOSQ qid %u",
__func__, qid);
} else {
- /*
+ /*
* Guest sent non-cont submission queue request.
* This setting is unsupported by this emulation.
*/
@@ -2039,7 +2039,7 @@ pci_nvme_handle_admin_cmd(struct pci_nvme_softc* sc, uint64_t value)
sqhead = sq->head;
DPRINTF("sqhead %u, tail %u", sqhead, sq->tail);
-
+
while (sqhead != atomic_load_acq_short(&sq->tail)) {
cmd = &(sq->qbase)[sqhead];
compl.cdw0 = 0;
diff --git a/usr.sbin/bhyve/pci_passthru.c b/usr.sbin/bhyve/pci_passthru.c
index d68fe25570cc..5d9e6c07c245 100644
--- a/usr.sbin/bhyve/pci_passthru.c
+++ b/usr.sbin/bhyve/pci_passthru.c
@@ -99,7 +99,7 @@ static int
msi_caplen(int msgctrl)
{
int len;
-
+
len = 10; /* minimum length of msi capability */
if (msgctrl & PCIM_MSICTRL_64BIT)
@@ -245,7 +245,7 @@ cfginitmsi(struct passthru_softc *sc)
}
} else if (cap == PCIY_MSIX) {
/*
- * Copy the MSI-X capability
+ * Copy the MSI-X capability
*/
sc->psc_msix.capoff = ptr;
caplen = 12;
@@ -305,7 +305,7 @@ cfginitmsi(struct passthru_softc *sc)
#endif
/* Make sure one of the capabilities is present */
- if (sc->psc_msi.capoff == 0 && sc->psc_msix.capoff == 0)
+ if (sc->psc_msi.capoff == 0 && sc->psc_msix.capoff == 0)
return (-1);
else
return (0);
@@ -899,13 +899,13 @@ msicap_access(struct passthru_softc *sc, int coff)
return (0);
}
-static int
+static int
msixcap_access(struct passthru_softc *sc, int coff)
{
- if (sc->psc_msix.capoff == 0)
+ if (sc->psc_msix.capoff == 0)
return (0);
- return (coff >= sc->psc_msix.capoff &&
+ return (coff >= sc->psc_msix.capoff &&
coff < sc->psc_msix.capoff + MSIX_CAPLEN);
}
@@ -992,12 +992,12 @@ passthru_cfgwrite(struct vmctx *ctx, int vcpu, struct pci_devinst *pi,
msix_table_entries = pi->pi_msix.table_count;
for (i = 0; i < msix_table_entries; i++) {
error = vm_setup_pptdev_msix(ctx, vcpu,
- sc->psc_sel.pc_bus, sc->psc_sel.pc_dev,
- sc->psc_sel.pc_func, i,
+ sc->psc_sel.pc_bus, sc->psc_sel.pc_dev,
+ sc->psc_sel.pc_func, i,
pi->pi_msix.table[i].addr,
pi->pi_msix.table[i].msg_data,
pi->pi_msix.table[i].vector_control);
-
+
if (error)
err(1, "vm_setup_pptdev_msix");
}
diff --git a/usr.sbin/bhyve/pci_virtio_9p.c b/usr.sbin/bhyve/pci_virtio_9p.c
index 6b110d7daf75..c741f0f94d9f 100644
--- a/usr.sbin/bhyve/pci_virtio_9p.c
+++ b/usr.sbin/bhyve/pci_virtio_9p.c
@@ -153,7 +153,7 @@ pci_vt9p_get_buffer(struct l9p_request *req, struct iovec *iov, size_t *niov,
{
struct pci_vt9p_request *preq = req->lr_aux;
size_t n = preq->vsr_niov - preq->vsr_respidx;
-
+
memcpy(iov, preq->vsr_iov + preq->vsr_respidx,
n * sizeof(struct iovec));
*niov = n;
@@ -304,7 +304,7 @@ pci_vt9p_init(struct vmctx *ctx, struct pci_devinst *pi, nvlist_t *nvl)
sc->vsc_config->tag_len = (uint16_t)strlen(sharename);
memcpy(sc->vsc_config->tag, sharename, sc->vsc_config->tag_len);
-
+
if (l9p_backend_fs_init(&sc->vsc_fs_backend, rootfd, ro) != 0) {
errno = ENXIO;
return (1);
diff --git a/usr.sbin/bhyve/pci_virtio_console.c b/usr.sbin/bhyve/pci_virtio_console.c
index e2af566a92e3..ad46482749d3 100644
--- a/usr.sbin/bhyve/pci_virtio_console.c
+++ b/usr.sbin/bhyve/pci_virtio_console.c
@@ -593,7 +593,7 @@ pci_vtcon_control_send(struct pci_vtcon_softc *sc,
vq_relchain(vq, req.idx, sizeof(struct pci_vtcon_control) + len);
vq_endchains(vq, 1);
}
-
+
static void
pci_vtcon_notify_tx(void *vsc, struct vqueue_info *vq)
@@ -696,7 +696,7 @@ pci_vtcon_init(struct vmctx *ctx, struct pci_devinst *pi, nvlist_t *nvl)
sc->vsc_config = calloc(1, sizeof(struct pci_vtcon_config));
sc->vsc_config->max_nr_ports = VTCON_MAXPORTS;
sc->vsc_config->cols = 80;
- sc->vsc_config->rows = 25;
+ sc->vsc_config->rows = 25;
vi_softc_linkup(&sc->vsc_vs, &vtcon_vi_consts, sc, pi, sc->vsc_queues);
sc->vsc_vs.vs_mtx = &sc->vsc_mtx;
diff --git a/usr.sbin/bhyve/pci_virtio_net.c b/usr.sbin/bhyve/pci_virtio_net.c
index 3714b34c5066..4122356ce70b 100644
--- a/usr.sbin/bhyve/pci_virtio_net.c
+++ b/usr.sbin/bhyve/pci_virtio_net.c
@@ -117,7 +117,7 @@ struct pci_vtnet_softc {
int resetting; /* protected by tx_mtx */
uint64_t vsc_features; /* negotiated features */
-
+
pthread_mutex_t rx_mtx;
int rx_merge; /* merged rx bufs in use */
@@ -628,9 +628,9 @@ pci_vtnet_init(struct vmctx *ctx, struct pci_devinst *pi, nvlist_t *nvl)
sc->vsc_consts.vc_hv_caps |= VIRTIO_NET_F_MRG_RXBUF |
netbe_get_cap(sc->vsc_be);
- /*
+ /*
* Since we do not actually support multiqueue,
- * set the maximum virtqueue pairs to 1.
+ * set the maximum virtqueue pairs to 1.
*/
sc->vsc_config.max_virtqueue_pairs = 1;
@@ -643,7 +643,7 @@ pci_vtnet_init(struct vmctx *ctx, struct pci_devinst *pi, nvlist_t *nvl)
/* Link is always up. */
sc->vsc_config.status = 1;
-
+
vi_softc_linkup(&sc->vsc_vs, &sc->vsc_consts, sc, pi, sc->vsc_queues);
sc->vsc_vs.vs_mtx = &sc->vsc_mtx;
@@ -660,12 +660,12 @@ pci_vtnet_init(struct vmctx *ctx, struct pci_devinst *pi, nvlist_t *nvl)
sc->rx_merge = 0;
sc->vhdrlen = sizeof(struct virtio_net_rxhdr) - 2;
- pthread_mutex_init(&sc->rx_mtx, NULL);
+ pthread_mutex_init(&sc->rx_mtx, NULL);
- /*
+ /*
* Initialize tx semaphore & spawn TX processing thread.
* As of now, only one thread for TX desc processing is
- * spawned.
+ * spawned.
*/
sc->tx_in_progress = 0;
pthread_mutex_init(&sc->tx_mtx, NULL);
diff --git a/usr.sbin/bhyve/pci_virtio_scsi.c b/usr.sbin/bhyve/pci_virtio_scsi.c
index e00591a603e0..a1dd880c65b3 100644
--- a/usr.sbin/bhyve/pci_virtio_scsi.c
+++ b/usr.sbin/bhyve/pci_virtio_scsi.c
@@ -648,7 +648,7 @@ pci_vtscsi_requestq_notify(void *vsc, struct vqueue_info *vq)
}
static int
-pci_vtscsi_init_queue(struct pci_vtscsi_softc *sc,
*** 184 LINES SKIPPED ***