git: c2fa905cf6c1 - main - bhyve: clean up trailing whitespaces

From: Toomas Soome <tsoome_at_FreeBSD.org>
Date: Wed, 29 Dec 2021 22:23:05 UTC
The branch main has been updated by tsoome:

URL: https://cgit.FreeBSD.org/src/commit/?id=c2fa905cf6c1cf1938a0353679e3bd0b617ca179

commit c2fa905cf6c1cf1938a0353679e3bd0b617ca179
Author:     Toomas Soome <tsoome@FreeBSD.org>
AuthorDate: 2021-12-26 07:52:38 +0000
Commit:     Toomas Soome <tsoome@FreeBSD.org>
CommitDate: 2021-12-27 17:58:10 +0000

    bhyve: clean up trailing whitespaces
    
    Clean up trailing whitespaces. No functional changes.
    
    Reviewed by: jhb
    Differential Revision: https://reviews.freebsd.org/D33681
---
 usr.sbin/bhyve/acpi.c               | 12 +++++-----
 usr.sbin/bhyve/audio.h              |  2 +-
 usr.sbin/bhyve/bhyverun.c           | 10 ++++-----
 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                | 16 +++++++-------
 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, 130 insertions(+), 130 deletions(-)

diff --git a/usr.sbin/bhyve/acpi.c b/usr.sbin/bhyve/acpi.c
index 580bb900dd43..95c65ecc15d2 100644
--- a/usr.sbin/bhyve/acpi.c
+++ b/usr.sbin/bhyve/acpi.c
@@ -77,7 +77,7 @@ __FBSDID("$FreeBSD$");
 #include "vmgenc.h"
 
 /*
- * Define the base address of the ACPI tables, the sizes of some tables, 
+ * Define the base address of the ACPI tables, the sizes of some tables,
  * and the offsets to the individual tables,
  */
 #define BHYVE_ACPI_BASE		0xf2400
@@ -447,7 +447,7 @@ basl_fwrite_fadt(FILE *fp)
 	EFPRINTF(fp, "[0008]\t\tAddress : 00000000%08X\n",
 	    PM1A_EVT_ADDR);
 	EFPRINTF(fp, "\n");
-	
+
 	EFPRINTF(fp,
 	    "[0012]\t\tPM1B Event Block : [Generic Address Structure]\n");
 	EFPRINTF(fp, "[0001]\t\tSpace ID : 01 [SystemIO]\n");
@@ -642,7 +642,7 @@ basl_fwrite_facs(FILE *fp)
 	EFFLUSH(fp);
 
 	return (0);
-	
+
 err_exit:
 	return (errno);
 }
@@ -842,7 +842,7 @@ basl_load(struct vmctx *ctx, int fd, uint64_t off)
 
 	if (fstat(fd, &sb) < 0)
 		return (errno);
-		
+
 	gaddr = paddr_guest2host(ctx, basl_acpi_base + off, sb.st_size);
 	if (gaddr == NULL)
 		return (EFAULT);
@@ -876,7 +876,7 @@ basl_compile(struct vmctx *ctx, int (*fwrite_section)(FILE *), uint64_t offset)
 			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,
@@ -907,7 +907,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 2b559a43e5df..88f4dc8709c4 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 c38a4ee84056..9d2b9704ecec 100644
--- a/usr.sbin/bhyve/bhyverun.c
+++ b/usr.sbin/bhyve/bhyverun.c
@@ -212,7 +212,7 @@ struct bhyvestats {
 struct mt_vmm_info {
 	pthread_t	mt_thr;
 	struct vmctx	*mt_ctx;
-	int		mt_vcpu;	
+	int		mt_vcpu;
 } mt_vmm_info[VM_MAXCPU];
 
 static cpuset_t *vcpumap[VM_MAXCPU] = { NULL };
@@ -1066,7 +1066,7 @@ do_open(const char *vmname)
 	bool reinit, romboot;
 #ifndef WITHOUT_CAPSICUM
 	cap_rights_t rights;
-	const cap_ioctl_t *cmds;	
+	const cap_ioctl_t *cmds;
 	size_t ncmds;
 #endif
 
@@ -1109,7 +1109,7 @@ do_open(const char *vmname)
 
 #ifndef WITHOUT_CAPSICUM
 	cap_rights_init(&rights, CAP_IOCTL, CAP_MMAP_RW);
-	if (caph_rights_limit(vm_get_device_fd(ctx), &rights) == -1) 
+	if (caph_rights_limit(vm_get_device_fd(ctx), &rights) == -1)
 		errx(EX_OSERR, "Unable to apply rights for sandbox");
 	vm_get_ioctls(&ncmds);
 	cmds = vm_get_ioctls(NULL);
@@ -1119,7 +1119,7 @@ do_open(const char *vmname)
 		errx(EX_OSERR, "Unable to apply rights for sandbox");
 	free((cap_ioctl_t *)cmds);
 #endif
- 
+
 	if (reinit) {
 		error = vm_reinit(ctx);
 		if (error) {
@@ -1354,7 +1354,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 d9813f30037f..4003bc438a58 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 1df750e9576c..c9ac9f0a1905 100644
--- a/usr.sbin/bhyve/config.c
+++ b/usr.sbin/bhyve/config.c
@@ -221,7 +221,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 9f82afb267b2..574da966df74 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 0640bc28ba2b..a91f3d14fb78 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 55f851590128..49a468305769 100644
--- a/usr.sbin/bhyve/mem.c
+++ b/usr.sbin/bhyve/mem.c
@@ -96,7 +96,7 @@ mmio_rb_lookup(struct mmio_rb_tree *rbt, uint64_t addr,
 		*entry = res;
 		return (0);
 	}
-	
+
 	return (ENOENT);
 }
 
@@ -172,7 +172,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
@@ -187,7 +187,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);
@@ -335,23 +335,23 @@ 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);
 
-		/* flush Per-vCPU cache */	
+		/* flush Per-vCPU cache */
 		for (i=0; i < VM_MAXCPU; i++) {
 			if (mmio_hint[i] == entry)
 				mmio_hint[i] = NULL;
@@ -362,7 +362,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 cb1730fc77df..ca4c96b10239 100644
--- a/usr.sbin/bhyve/net_backends.c
+++ b/usr.sbin/bhyve/net_backends.c
@@ -525,7 +525,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 38ec87c34eed..316fbcf0f18d 100644
--- a/usr.sbin/bhyve/pci_ahci.c
+++ b/usr.sbin/bhyve/pci_ahci.c
@@ -1937,7 +1937,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;
 	}
@@ -2470,7 +2470,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 2bca6753e6a0..85c02889ad51 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;
 
@@ -1591,14 +1591,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;
@@ -1744,7 +1744,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);
@@ -1799,7 +1799,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);
@@ -1892,7 +1892,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:
@@ -1941,7 +1941,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;
@@ -2137,7 +2137,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;
@@ -2209,7 +2209,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;
@@ -2223,7 +2223,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));
@@ -2239,7 +2239,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;
@@ -2307,7 +2307,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 0b46bcc6200e..92eaa80e8cf6 100644
--- a/usr.sbin/bhyve/pci_emul.c
+++ b/usr.sbin/bhyve/pci_emul.c
@@ -2341,7 +2341,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 ??
 		 */
@@ -2366,7 +2366,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];
@@ -2385,7 +2385,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 6eac0720f09f..651a0a52f6ec 100644
--- a/usr.sbin/bhyve/pci_emul.h
+++ b/usr.sbin/bhyve/pci_emul.h
@@ -110,7 +110,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.
  */
@@ -156,7 +156,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;
@@ -263,21 +263,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 4bf64e3f2adc..e0d8167a5928 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 65a85f6d603d..a34366dedc5a 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 8cc536fef112..42a6e5c2f78c 100644
--- a/usr.sbin/bhyve/pci_lpc.c
+++ b/usr.sbin/bhyve/pci_lpc.c
@@ -161,7 +161,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 07b079ecd4a1..2410366de197 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
@@ -780,7 +780,7 @@ pci_nvme_aer_get(struct pci_nvme_softc *sc)
 		sc->aer_count--;
 	}
 	pthread_mutex_unlock(&sc->aer_mtx);
-	
+
 	return (aer);
 }
 
@@ -1041,7 +1041,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,
@@ -1222,7 +1222,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.
 		 */
@@ -1842,7 +1842,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 769d7c160037..240571f209e3 100644
--- a/usr.sbin/bhyve/pci_passthru.c
+++ b/usr.sbin/bhyve/pci_passthru.c
@@ -97,7 +97,7 @@ static int
 msi_caplen(int msgctrl)
 {
 	int len;
-	
+
 	len = 10;		/* minimum length of msi capability */
 
 	if (msgctrl & PCIM_MSICTRL_64BIT)
@@ -211,7 +211,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;
@@ -271,7 +271,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);
@@ -726,13 +726,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);
 }
 
@@ -819,12 +819,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 70f3eba4bc34..3ec7eaa06c39 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 71c3375a57ac..0414fc540c2b 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));
*** 250 LINES SKIPPED ***