diff options
author | Mark Johnston <markj@FreeBSD.org> | 2022-10-08 15:22:38 +0000 |
---|---|---|
committer | Mark Johnston <markj@FreeBSD.org> | 2022-10-08 15:33:21 +0000 |
commit | 98d920d9cf0b439ea351c60353626946971684f6 (patch) | |
tree | 92aae6a56887e5efe045eded751bc1b9694e6a87 /usr.sbin/bhyve | |
parent | 143942f9929a36ec7fe56556d0afe0b2d23e08c4 (diff) | |
download | src-98d920d9cf0b439ea351c60353626946971684f6.tar.gz src-98d920d9cf0b439ea351c60353626946971684f6.zip |
bhyve: Annotate unused function parameters
MFC after: 1 week
Diffstat (limited to 'usr.sbin/bhyve')
36 files changed, 223 insertions, 204 deletions
diff --git a/usr.sbin/bhyve/block_if.c b/usr.sbin/bhyve/block_if.c index 05c9d9731754..8f6c7828f2b1 100644 --- a/usr.sbin/bhyve/block_if.c +++ b/usr.sbin/bhyve/block_if.c @@ -409,7 +409,8 @@ blockif_thr(void *arg) } static void -blockif_sigcont_handler(int signal, enum ev_type type, void *arg) +blockif_sigcont_handler(int signal __unused, enum ev_type type __unused, + void *arg __unused) { struct blockif_sig_elem *bse; @@ -656,7 +657,7 @@ err: } static void -blockif_resized(int fd, enum ev_type type, void *arg) +blockif_resized(int fd, enum ev_type type __unused, void *arg) { struct blockif_ctxt *bc; struct stat sb; diff --git a/usr.sbin/bhyve/bootrom.c b/usr.sbin/bhyve/bootrom.c index 2406d4539e55..b851d39b485c 100644 --- a/usr.sbin/bhyve/bootrom.c +++ b/usr.sbin/bhyve/bootrom.c @@ -84,8 +84,9 @@ static struct bootrom_var_state { * that the Firmware Volume area is writable and persistent. */ static int -bootrom_var_mem_handler(struct vmctx *ctx, int vcpu, int dir, uint64_t addr, - int size, uint64_t *val, void *arg1, long arg2) +bootrom_var_mem_handler(struct vmctx *ctx __unused, int vcpu __unused, int dir, + uint64_t addr, int size, uint64_t *val, void *arg1 __unused, + long arg2 __unused) { off_t offset; diff --git a/usr.sbin/bhyve/fwctl.c b/usr.sbin/bhyve/fwctl.c index 7027e34a77f0..b4bfecb2bedd 100644 --- a/usr.sbin/bhyve/fwctl.c +++ b/usr.sbin/bhyve/fwctl.c @@ -119,7 +119,7 @@ errop_set(int err) } static int -errop_start(uint32_t len) +errop_start(uint32_t len __unused) { errop_code = ENOENT; @@ -128,7 +128,7 @@ errop_start(uint32_t len) } static void -errop_data(uint32_t data, uint32_t len) +errop_data(uint32_t data __unused, uint32_t len __unused) { /* ignore */ @@ -144,7 +144,7 @@ errop_result(struct iovec **data) } static void -errop_done(struct iovec *data) +errop_done(struct iovec *data __unused) { /* assert data is NULL */ @@ -200,7 +200,7 @@ fget_start(uint32_t len) } static void -fget_data(uint32_t data, uint32_t len) +fget_data(uint32_t data, uint32_t len __unused) { *((uint32_t *) &fget_str[fget_cnt]) = data; @@ -244,7 +244,7 @@ fget_result(struct iovec **data, int val) } static void -fget_done(struct iovec *data) +fget_done(struct iovec *data __unused) { /* nothing needs to be freed */ @@ -520,8 +520,8 @@ fwctl_outl(uint32_t val) } static int -fwctl_handler(struct vmctx *ctx, int vcpu, int in, int port, int bytes, - uint32_t *eax, void *arg) +fwctl_handler(struct vmctx *ctx __unused, int vcpu __unused, int in, + int port __unused, int bytes, uint32_t *eax, void *arg __unused) { if (in) { diff --git a/usr.sbin/bhyve/gdb.c b/usr.sbin/bhyve/gdb.c index 81f132e17350..cf0d5995a5d3 100644 --- a/usr.sbin/bhyve/gdb.c +++ b/usr.sbin/bhyve/gdb.c @@ -1704,7 +1704,7 @@ check_command(int fd) } static void -gdb_readable(int fd, enum ev_type event, void *arg) +gdb_readable(int fd, enum ev_type event __unused, void *arg __unused) { ssize_t nread; int pending; @@ -1743,14 +1743,14 @@ gdb_readable(int fd, enum ev_type event, void *arg) } static void -gdb_writable(int fd, enum ev_type event, void *arg) +gdb_writable(int fd, enum ev_type event __unused, void *arg __unused) { send_pending_data(fd); } static void -new_connection(int fd, enum ev_type event, void *arg) +new_connection(int fd, enum ev_type event __unused, void *arg) { int optval, s; diff --git a/usr.sbin/bhyve/inout.c b/usr.sbin/bhyve/inout.c index b65d273f4320..02b38c9b7a99 100644 --- a/usr.sbin/bhyve/inout.c +++ b/usr.sbin/bhyve/inout.c @@ -66,8 +66,8 @@ static struct { } inout_handlers[MAX_IOPORTS]; static int -default_inout(struct vmctx *ctx, int vcpu, int in, int port, int bytes, - uint32_t *eax, void *arg) +default_inout(struct vmctx *ctx __unused, int vcpu __unused, int in, + int port __unused, int bytes, uint32_t *eax, void *arg __unused) { if (in) { switch (bytes) { diff --git a/usr.sbin/bhyve/mevent.c b/usr.sbin/bhyve/mevent.c index b7749ed67745..8a6267f4acbd 100644 --- a/usr.sbin/bhyve/mevent.c +++ b/usr.sbin/bhyve/mevent.c @@ -99,7 +99,7 @@ mevent_qunlock(void) } static void -mevent_pipe_read(int fd, enum ev_type type, void *param) +mevent_pipe_read(int fd, enum ev_type type __unused, void *param __unused) { char buf[MEVENT_MAX]; int status; diff --git a/usr.sbin/bhyve/mptbl.c b/usr.sbin/bhyve/mptbl.c index 56582256a857..6e3f78a22888 100644 --- a/usr.sbin/bhyve/mptbl.c +++ b/usr.sbin/bhyve/mptbl.c @@ -213,8 +213,8 @@ mpt_count_ioint_entries(void) } static void -mpt_generate_pci_int(int bus, int slot, int pin, int pirq_pin, int ioapic_irq, - void *arg) +mpt_generate_pci_int(int bus, int slot, int pin, int pirq_pin __unused, + int ioapic_irq, void *arg) { int_entry_ptr *mpiep, mpie; diff --git a/usr.sbin/bhyve/net_backends.c b/usr.sbin/bhyve/net_backends.c index adb3006f415b..a20199a0b76e 100644 --- a/usr.sbin/bhyve/net_backends.c +++ b/usr.sbin/bhyve/net_backends.c @@ -220,7 +220,7 @@ tap_cleanup(struct net_backend *be) static int tap_init(struct net_backend *be, const char *devname, - nvlist_t *nvl, net_be_rxeof_t cb, void *param) + nvlist_t *nvl __unused, net_be_rxeof_t cb, void *param) { struct tap_priv *priv = (struct tap_priv *)be->opaque; char tbuf[80]; @@ -395,15 +395,15 @@ tap_recv_disable(struct net_backend *be) } static uint64_t -tap_get_cap(struct net_backend *be) +tap_get_cap(struct net_backend *be __unused) { return (0); /* no capabilities for now */ } static int -tap_set_cap(struct net_backend *be, uint64_t features, - unsigned vnet_hdr_len) +tap_set_cap(struct net_backend *be __unused, uint64_t features, + unsigned vnet_hdr_len) { return ((features || vnet_hdr_len) ? -1 : 0); @@ -450,7 +450,7 @@ DATA_SET(net_backend_set, vmnet_backend); #define NG_SBUF_MAX_SIZE (4 * 1024 * 1024) static int -ng_init(struct net_backend *be, const char *devname, +ng_init(struct net_backend *be, const char *devname __unused, nvlist_t *nvl, net_be_rxeof_t cb, void *param) { struct tap_priv *p = (struct tap_priv *)be->opaque; @@ -675,8 +675,8 @@ netmap_get_cap(struct net_backend *be) } static int -netmap_set_cap(struct net_backend *be, uint64_t features, - unsigned vnet_hdr_len) +netmap_set_cap(struct net_backend *be, uint64_t features __unused, + unsigned vnet_hdr_len) { return (netmap_set_vnet_hdr_len(be, vnet_hdr_len)); @@ -684,7 +684,7 @@ netmap_set_cap(struct net_backend *be, uint64_t features, static int netmap_init(struct net_backend *be, const char *devname, - nvlist_t *nvl, net_be_rxeof_t cb, void *param) + nvlist_t *nvl __unused, net_be_rxeof_t cb, void *param) { struct netmap_priv *priv = (struct netmap_priv *)be->opaque; diff --git a/usr.sbin/bhyve/pci_ahci.c b/usr.sbin/bhyve/pci_ahci.c index 0826530cd7d0..0d8cc3995711 100644 --- a/usr.sbin/bhyve/pci_ahci.c +++ b/usr.sbin/bhyve/pci_ahci.c @@ -2191,8 +2191,9 @@ pci_ahci_host_write(struct pci_ahci_softc *sc, uint64_t offset, uint64_t value) } static void -pci_ahci_write(struct vmctx *ctx, int vcpu, struct pci_devinst *pi, - int baridx, uint64_t offset, int size, uint64_t value) +pci_ahci_write(struct vmctx *ctx __unused, int vcpu __unused, + struct pci_devinst *pi, int baridx, uint64_t offset, int size, + uint64_t value) { struct pci_ahci_softc *sc = pi->pi_arg; @@ -2285,8 +2286,8 @@ pci_ahci_port_read(struct pci_ahci_softc *sc, uint64_t offset) } static uint64_t -pci_ahci_read(struct vmctx *ctx, int vcpu, struct pci_devinst *pi, int baridx, - uint64_t regoff, int size) +pci_ahci_read(struct vmctx *ctx __unused, int vcpu __unused, + struct pci_devinst *pi, int baridx, uint64_t regoff, int size) { struct pci_ahci_softc *sc = pi->pi_arg; uint64_t offset; @@ -2413,7 +2414,7 @@ pci_ahci_hd_legacy_config(nvlist_t *nvl, const char *opts) } static int -pci_ahci_init(struct vmctx *ctx, struct pci_devinst *pi, nvlist_t *nvl) +pci_ahci_init(struct vmctx *ctx __unused, struct pci_devinst *pi, nvlist_t *nvl) { char bident[sizeof("XX:XX:XX")]; char node_name[sizeof("XX")]; @@ -2661,7 +2662,7 @@ done: } static int -pci_ahci_pause(struct vmctx *ctx, struct pci_devinst *pi) +pci_ahci_pause(struct vmctx *ctx __unused, struct pci_devinst *pi) { struct pci_ahci_softc *sc; struct blockif_ctxt *bctxt; @@ -2681,7 +2682,7 @@ pci_ahci_pause(struct vmctx *ctx, struct pci_devinst *pi) } static int -pci_ahci_resume(struct vmctx *ctx, struct pci_devinst *pi) +pci_ahci_resume(struct vmctx *ctx __unused, struct pci_devinst *pi) { struct pci_ahci_softc *sc; struct blockif_ctxt *bctxt; diff --git a/usr.sbin/bhyve/pci_e82545.c b/usr.sbin/bhyve/pci_e82545.c index dcded0b8b1ae..d630e9d1d090 100644 --- a/usr.sbin/bhyve/pci_e82545.c +++ b/usr.sbin/bhyve/pci_e82545.c @@ -407,15 +407,15 @@ e82545_init_eeprom(struct e82545_softc *sc) } static void -e82545_write_mdi(struct e82545_softc *sc, uint8_t reg_addr, - uint8_t phy_addr, uint32_t data) +e82545_write_mdi(struct e82545_softc *sc __unused, uint8_t reg_addr, + uint8_t phy_addr, uint32_t data) { DPRINTF("Write mdi reg:0x%x phy:0x%x data: 0x%x", reg_addr, phy_addr, data); } static uint32_t -e82545_read_mdi(struct e82545_softc *sc, uint8_t reg_addr, - uint8_t phy_addr) +e82545_read_mdi(struct e82545_softc *sc __unused, uint8_t reg_addr, + uint8_t phy_addr) { //DPRINTF("Read mdi reg:0x%x phy:0x%x", reg_addr, phy_addr); switch (reg_addr) { @@ -554,7 +554,7 @@ e82545_eecd_strobe(struct e82545_softc *sc) } static void -e82545_itr_callback(int fd, enum ev_type type, void *param) +e82545_itr_callback(int fd __unused, enum ev_type type __unused, void *param) { uint32_t new; struct e82545_softc *sc = param; @@ -830,7 +830,7 @@ e82545_bufsz(uint32_t rctl) /* XXX one packet at a time until this is debugged */ static void -e82545_rx_callback(int fd, enum ev_type type, void *param) +e82545_rx_callback(int fd __unused, enum ev_type type __unused, void *param) { struct e82545_softc *sc = param; struct e1000_rx_desc *rxd; @@ -2110,8 +2110,9 @@ e82545_read_register(struct e82545_softc *sc, uint32_t offset) } static void -e82545_write(struct vmctx *ctx, int vcpu, struct pci_devinst *pi, int baridx, - uint64_t offset, int size, uint64_t value) +e82545_write(struct vmctx *ctx __unused, int vcpu __unused, + struct pci_devinst *pi, int baridx, uint64_t offset, int size, + uint64_t value) { struct e82545_softc *sc; @@ -2160,8 +2161,8 @@ e82545_write(struct vmctx *ctx, int vcpu, struct pci_devinst *pi, int baridx, } static uint64_t -e82545_read(struct vmctx *ctx, int vcpu, struct pci_devinst *pi, int baridx, - uint64_t offset, int size) +e82545_read(struct vmctx *ctx __unused, int vcpu __unused, + struct pci_devinst *pi, int baridx, uint64_t offset, int size) { struct e82545_softc *sc; uint64_t retval; diff --git a/usr.sbin/bhyve/pci_emul.c b/usr.sbin/bhyve/pci_emul.c index db75684af5d3..1b2f8b1a858e 100644 --- a/usr.sbin/bhyve/pci_emul.c +++ b/usr.sbin/bhyve/pci_emul.c @@ -1161,9 +1161,9 @@ msicap_cfgwrite(struct pci_devinst *pi, int capoff, int offset, pci_lintr_update(pi); } -void -pciecap_cfgwrite(struct pci_devinst *pi, int capoff, int offset, - int bytes, uint32_t val) +static void +pciecap_cfgwrite(struct pci_devinst *pi, int capoff __unused, int offset, + int bytes, uint32_t val) { /* XXX don't write to the readonly parts */ @@ -1274,8 +1274,9 @@ pci_emul_iscap(struct pci_devinst *pi, int offset) } static int -pci_emul_fallback_handler(struct vmctx *ctx, int vcpu, int dir, uint64_t addr, - int size, uint64_t *val, void *arg1, long arg2) +pci_emul_fallback_handler(struct vmctx *ctx __unused, int vcpu __unused, + int dir, uint64_t addr __unused, int size __unused, uint64_t *val, + void *arg1 __unused, long arg2 __unused) { /* * Ignore writes; return 0xff's for reads. The mem read code @@ -1290,7 +1291,7 @@ pci_emul_fallback_handler(struct vmctx *ctx, int vcpu, int dir, uint64_t addr, static int pci_emul_ecfg_handler(struct vmctx *ctx, int vcpu, int dir, uint64_t addr, - int bytes, uint64_t *val, void *arg1, long arg2) + int bytes, uint64_t *val, void *arg1 __unused, long arg2 __unused) { int bus, slot, func, coff, in; @@ -1486,8 +1487,8 @@ init_pci(struct vmctx *ctx) } static void -pci_apic_prt_entry(int bus, int slot, int pin, int pirq_pin, int ioapic_irq, - void *arg) +pci_apic_prt_entry(int bus __unused, int slot, int pin, int pirq_pin __unused, + int ioapic_irq, void *arg __unused) { dsdt_line(" Package ()"); @@ -1500,8 +1501,8 @@ pci_apic_prt_entry(int bus, int slot, int pin, int pirq_pin, int ioapic_irq, } static void -pci_pirq_prt_entry(int bus, int slot, int pin, int pirq_pin, int ioapic_irq, - void *arg) +pci_pirq_prt_entry(int bus __unused, int slot, int pin, int pirq_pin, + int ioapic_irq __unused, void *arg __unused) { char *name; @@ -2212,8 +2213,8 @@ pci_cfgrw(struct vmctx *ctx, int vcpu, int in, int bus, int slot, int func, static int cfgenable, cfgbus, cfgslot, cfgfunc, cfgoff; static int -pci_emul_cfgaddr(struct vmctx *ctx, int vcpu, int in, int port, int bytes, - uint32_t *eax, void *arg) +pci_emul_cfgaddr(struct vmctx *ctx __unused, int vcpu __unused, int in, + int port __unused, int bytes, uint32_t *eax, void *arg __unused) { uint32_t x; @@ -2243,7 +2244,7 @@ INOUT_PORT(pci_cfgaddr, CONF1_ADDR_PORT, IOPORT_F_INOUT, pci_emul_cfgaddr); static int pci_emul_cfgdata(struct vmctx *ctx, int vcpu, int in, int port, int bytes, - uint32_t *eax, void *arg) + uint32_t *eax, void *arg __unused) { int coff; @@ -2464,7 +2465,8 @@ struct pci_emul_dsoftc { #define PCI_EMUL_MSIX_MSGS 16 static int -pci_emul_dinit(struct vmctx *ctx, struct pci_devinst *pi, nvlist_t *nvl) +pci_emul_dinit(struct vmctx *ctx __unused, struct pci_devinst *pi, + nvlist_t *nvl __unused) { int error; struct pci_emul_dsoftc *sc; @@ -2493,8 +2495,9 @@ pci_emul_dinit(struct vmctx *ctx, struct pci_devinst *pi, nvlist_t *nvl) } static void -pci_emul_diow(struct vmctx *ctx, int vcpu, struct pci_devinst *pi, int baridx, - uint64_t offset, int size, uint64_t value) +pci_emul_diow(struct vmctx *ctx __unused, int vcpu __unused, + struct pci_devinst *pi, int baridx, uint64_t offset, int size, + uint64_t value) { int i; struct pci_emul_dsoftc *sc = pi->pi_arg; @@ -2560,8 +2563,8 @@ pci_emul_diow(struct vmctx *ctx, int vcpu, struct pci_devinst *pi, int baridx, } static uint64_t -pci_emul_dior(struct vmctx *ctx, int vcpu, struct pci_devinst *pi, int baridx, - uint64_t offset, int size) +pci_emul_dior(struct vmctx *ctx __unused, int vcpu __unused, + struct pci_devinst *pi, int baridx, uint64_t offset, int size) { struct pci_emul_dsoftc *sc = pi->pi_arg; uint32_t value; @@ -2619,9 +2622,8 @@ pci_emul_dior(struct vmctx *ctx, int vcpu, struct pci_devinst *pi, int baridx, #ifdef BHYVE_SNAPSHOT int -pci_emul_snapshot(struct vm_snapshot_meta *meta) +pci_emul_snapshot(struct vm_snapshot_meta *meta __unused) { - return (0); } #endif diff --git a/usr.sbin/bhyve/pci_fbuf.c b/usr.sbin/bhyve/pci_fbuf.c index e772f29770e6..43b53931f14c 100644 --- a/usr.sbin/bhyve/pci_fbuf.c +++ b/usr.sbin/bhyve/pci_fbuf.c @@ -117,8 +117,9 @@ static struct pci_fbuf_softc *fbuf_sc; #define PCI_FBUF_MSI_MSGS 4 static void -pci_fbuf_write(struct vmctx *ctx, int vcpu, struct pci_devinst *pi, - int baridx, uint64_t offset, int size, uint64_t value) +pci_fbuf_write(struct vmctx *ctx __unused, int vcpu __unused, + struct pci_devinst *pi, int baridx, uint64_t offset, int size, + uint64_t value) { struct pci_fbuf_softc *sc; uint8_t *p; @@ -171,8 +172,8 @@ pci_fbuf_write(struct vmctx *ctx, int vcpu, struct pci_devinst *pi, } static uint64_t -pci_fbuf_read(struct vmctx *ctx, int vcpu, struct pci_devinst *pi, - int baridx, uint64_t offset, int size) +pci_fbuf_read(struct vmctx *ctx __unused, int vcpu __unused, + struct pci_devinst *pi, int baridx, uint64_t offset, int size) { struct pci_fbuf_softc *sc; uint8_t *p; diff --git a/usr.sbin/bhyve/pci_hda.c b/usr.sbin/bhyve/pci_hda.c index 1a2a3844ab20..9ebfbfbaa5bf 100644 --- a/usr.sbin/bhyve/pci_hda.c +++ b/usr.sbin/bhyve/pci_hda.c @@ -890,7 +890,7 @@ hda_get_offset_stream(uint8_t stream_ind) } static void -hda_set_gctl(struct hda_softc *sc, uint32_t offset, uint32_t old) +hda_set_gctl(struct hda_softc *sc, uint32_t offset, uint32_t old __unused) { uint32_t value = hda_get_reg_by_offset(sc, offset); @@ -913,7 +913,8 @@ hda_set_statests(struct hda_softc *sc, uint32_t offset, uint32_t old) } static void -hda_set_corbwp(struct hda_softc *sc, uint32_t offset, uint32_t old) +hda_set_corbwp(struct hda_softc *sc, uint32_t offset __unused, + uint32_t old __unused) { hda_corb_run(sc); } @@ -939,7 +940,7 @@ hda_set_corbctl(struct hda_softc *sc, uint32_t offset, uint32_t old) } static void -hda_set_rirbctl(struct hda_softc *sc, uint32_t offset, uint32_t old) +hda_set_rirbctl(struct hda_softc *sc, uint32_t offset, uint32_t old __unused) { uint32_t value = hda_get_reg_by_offset(sc, offset); int err; @@ -1025,7 +1026,7 @@ hda_set_sdctl(struct hda_softc *sc, uint32_t offset, uint32_t old) } static void -hda_set_sdctl2(struct hda_softc *sc, uint32_t offset, uint32_t old) +hda_set_sdctl2(struct hda_softc *sc, uint32_t offset, uint32_t old __unused) { uint32_t value = hda_get_reg_by_offset(sc, offset); @@ -1256,8 +1257,9 @@ pci_hda_init(struct vmctx *ctx, struct pci_devinst *pi, nvlist_t *nvl) } static void -pci_hda_write(struct vmctx *ctx, int vcpu, struct pci_devinst *pi, - int baridx, uint64_t offset, int size, uint64_t value) +pci_hda_write(struct vmctx *ctx __unused, int vcpu __unused, + struct pci_devinst *pi, int baridx, uint64_t offset, int size, + uint64_t value) { struct hda_softc *sc = pi->pi_arg; int err; @@ -1273,8 +1275,8 @@ pci_hda_write(struct vmctx *ctx, int vcpu, struct pci_devinst *pi, } static uint64_t -pci_hda_read(struct vmctx *ctx, int vcpu, struct pci_devinst *pi, - int baridx, uint64_t offset, int size) +pci_hda_read(struct vmctx *ctx __unused, int vcpu __unused, + struct pci_devinst *pi, int baridx, uint64_t offset, int size) { struct hda_softc *sc = pi->pi_arg; uint64_t value = 0; diff --git a/usr.sbin/bhyve/pci_hostbridge.c b/usr.sbin/bhyve/pci_hostbridge.c index 44649715ff88..50c334d8e408 100644 --- a/usr.sbin/bhyve/pci_hostbridge.c +++ b/usr.sbin/bhyve/pci_hostbridge.c @@ -37,7 +37,8 @@ __FBSDID("$FreeBSD$"); #include "pci_emul.h" static int -pci_hostbridge_init(struct vmctx *ctx, struct pci_devinst *pi, nvlist_t *nvl) +pci_hostbridge_init(struct vmctx *ctx __unused, struct pci_devinst *pi, + nvlist_t *nvl) { const char *value; u_int vendor, device; @@ -65,9 +66,8 @@ pci_hostbridge_init(struct vmctx *ctx, struct pci_devinst *pi, nvlist_t *nvl) } static int -pci_amd_hostbridge_legacy_config(nvlist_t *nvl, const char *opts) +pci_amd_hostbridge_legacy_config(nvlist_t *nvl, const char *opts __unused) { - set_config_value_node(nvl, "vendor", "0x1022"); /* AMD */ set_config_value_node(nvl, "devid", "0x7432"); /* made up */ diff --git a/usr.sbin/bhyve/pci_irq.c b/usr.sbin/bhyve/pci_irq.c index 4ecb3eddb07f..ff41f6ec88dc 100644 --- a/usr.sbin/bhyve/pci_irq.c +++ b/usr.sbin/bhyve/pci_irq.c @@ -134,7 +134,7 @@ pci_irq_use(int irq) } void -pci_irq_init(struct vmctx *ctx) +pci_irq_init(struct vmctx *ctx __unused) { int i; diff --git a/usr.sbin/bhyve/pci_lpc.c b/usr.sbin/bhyve/pci_lpc.c index 35f93ded68ec..5425a7935973 100644 --- a/usr.sbin/bhyve/pci_lpc.c +++ b/usr.sbin/bhyve/pci_lpc.c @@ -171,7 +171,7 @@ lpc_uart_intr_assert(void *arg) } static void -lpc_uart_intr_deassert(void *arg) +lpc_uart_intr_deassert(void *arg __unused) { /* * The COM devices on the LPC bus generate edge triggered interrupts, @@ -180,8 +180,8 @@ lpc_uart_intr_deassert(void *arg) } static int -lpc_uart_io_handler(struct vmctx *ctx, int vcpu, int in, int port, int bytes, - uint32_t *eax, void *arg) +lpc_uart_io_handler(struct vmctx *ctx __unused, int vcpu __unused, int in, + int port, int bytes, uint32_t *eax, void *arg) { int offset; struct lpc_uart_softc *sc = arg; @@ -398,8 +398,8 @@ pci_lpc_uart_dsdt(void) LPC_DSDT(pci_lpc_uart_dsdt); static int -pci_lpc_cfgwrite(struct vmctx *ctx, int vcpu, struct pci_devinst *pi, - int coff, int bytes, uint32_t val) +pci_lpc_cfgwrite(struct vmctx *ctx, int vcpu __unused, struct pci_devinst *pi, + int coff, int bytes, uint32_t val) { int pirq_pin; @@ -419,14 +419,16 @@ pci_lpc_cfgwrite(struct vmctx *ctx, int vcpu, struct pci_devinst *pi, } static void -pci_lpc_write(struct vmctx *ctx, int vcpu, struct pci_devinst *pi, - int baridx, uint64_t offset, int size, uint64_t value) +pci_lpc_write(struct vmctx *ctx __unused, int vcpu __unused, + struct pci_devinst *pi __unused, int baridx __unused, + uint64_t offset __unused, int size __unused, uint64_t value __unused) { } static uint64_t -pci_lpc_read(struct vmctx *ctx, int vcpu, struct pci_devinst *pi, - int baridx, uint64_t offset, int size) +pci_lpc_read(struct vmctx *ctx __unused, int vcpu __unused, + struct pci_devinst *pi __unused, int baridx __unused, uint64_t offset __unused, + int size __unused) { return (0); } @@ -435,9 +437,8 @@ pci_lpc_read(struct vmctx *ctx, int vcpu, struct pci_devinst *pi, #define LPC_VENDOR 0x8086 static int -pci_lpc_init(struct vmctx *ctx, struct pci_devinst *pi, nvlist_t *nvl) +pci_lpc_init(struct vmctx *ctx, struct pci_devinst *pi, nvlist_t *nvl __unused) { - /* * Do not allow more than one LPC bridge to be configured. */ diff --git a/usr.sbin/bhyve/pci_passthru.c b/usr.sbin/bhyve/pci_passthru.c index 43e70d42e2b2..8d76d564b4ae 100644 --- a/usr.sbin/bhyve/pci_passthru.c +++ b/usr.sbin/bhyve/pci_passthru.c @@ -454,7 +454,7 @@ msix_table_write(struct vmctx *ctx, int vcpu, struct passthru_softc *sc, } static int -init_msix_table(struct vmctx *ctx, struct passthru_softc *sc) +init_msix_table(struct vmctx *ctx __unused, struct passthru_softc *sc) { struct pci_devinst *pi = sc->psc_pi; struct pci_bar_mmap pbm; @@ -515,7 +515,7 @@ init_msix_table(struct vmctx *ctx, struct passthru_softc *sc) } static int -cfginitbar(struct vmctx *ctx, struct passthru_softc *sc) +cfginitbar(struct vmctx *ctx __unused, struct passthru_softc *sc) { int i, error; struct pci_devinst *pi; @@ -682,8 +682,8 @@ passthru_legacy_config(nvlist_t *nvl, const char *opts) } static int -passthru_init_rom(struct vmctx *const ctx, struct passthru_softc *const sc, - const char *const romfile) +passthru_init_rom(struct vmctx *const ctx __unused, + struct passthru_softc *const sc, const char *const romfile) { if (romfile == NULL) { return (0); @@ -903,8 +903,8 @@ msixcap_access(struct passthru_softc *sc, int coff) } static int -passthru_cfgread(struct vmctx *ctx, int vcpu, struct pci_devinst *pi, - int coff, int bytes, uint32_t *rv) +passthru_cfgread(struct vmctx *ctx __unused, int vcpu __unused, + struct pci_devinst *pi, int coff, int bytes, uint32_t *rv) { struct passthru_softc *sc; @@ -1057,8 +1057,8 @@ passthru_write(struct vmctx *ctx, int vcpu, struct pci_devinst *pi, int baridx, } static uint64_t -passthru_read(struct vmctx *ctx, int vcpu, struct pci_devinst *pi, int baridx, - uint64_t offset, int size) +passthru_read(struct vmctx *ctx __unused, int vcpu __unused, + struct pci_devinst *pi, int baridx, uint64_t offset, int size) { struct passthru_softc *sc; struct pci_bar_ioreq pio; diff --git a/usr.sbin/bhyve/pci_uart.c b/usr.sbin/bhyve/pci_uart.c index 3064d6fe627a..2e4a0eac05f9 100644 --- a/usr.sbin/bhyve/pci_uart.c +++ b/usr.sbin/bhyve/pci_uart.c @@ -66,19 +66,19 @@ pci_uart_intr_deassert(void *arg) } static void -pci_uart_write(struct vmctx *ctx, int vcpu, struct pci_devinst *pi, - int baridx, uint64_t offset, int size, uint64_t value) +pci_uart_write(struct vmctx *ctx __unused, int vcpu __unused, + struct pci_devinst *pi, int baridx, uint64_t offset, int size, + uint64_t value) { - assert(baridx == 0); assert(size == 1); uart_write(pi->pi_arg, offset, value); } -uint64_t -pci_uart_read(struct vmctx *ctx, int vcpu, struct pci_devinst *pi, - int baridx, uint64_t offset, int size) +static uint64_t +pci_uart_read(struct vmctx *ctx __unused, int vcpu __unused, + struct pci_devinst *pi, int baridx, uint64_t offset, int size) { uint8_t val; @@ -99,7 +99,7 @@ pci_uart_legacy_config(nvlist_t *nvl, const char *opts) } static int -pci_uart_init(struct vmctx *ctx, struct pci_devinst *pi, nvlist_t *nvl) +pci_uart_init(struct vmctx *ctx __unused, struct pci_devinst *pi, nvlist_t *nvl) { struct uart_softc *sc; const char *device; diff --git a/usr.sbin/bhyve/pci_virtio_9p.c b/usr.sbin/bhyve/pci_virtio_9p.c index 1ed0eba6a8ed..c24b33acc299 100644 --- a/usr.sbin/bhyve/pci_virtio_9p.c +++ b/usr.sbin/bhyve/pci_virtio_9p.c @@ -147,7 +147,7 @@ pci_vt9p_cfgread(void *vsc, int offset, int size, uint32_t *retval) static int pci_vt9p_get_buffer(struct l9p_request *req, struct iovec *iov, size_t *niov, - void *arg) + void *arg __unused) { struct pci_vt9p_request *preq = req->lr_aux; size_t n = preq->vsr_niov - preq->vsr_respidx; @@ -159,8 +159,8 @@ pci_vt9p_get_buffer(struct l9p_request *req, struct iovec *iov, size_t *niov, } static int -pci_vt9p_send(struct l9p_request *req, const struct iovec *iov, - const size_t niov, const size_t iolen, void *arg) +pci_vt9p_send(struct l9p_request *req, const struct iovec *iov __unused, + const size_t niov __unused, const size_t iolen, void *arg __unused) { struct pci_vt9p_request *preq = req->lr_aux; struct pci_vt9p_softc *sc = preq->vsr_sc; @@ -176,8 +176,8 @@ pci_vt9p_send(struct l9p_request *req, const struct iovec *iov, } static void -pci_vt9p_drop(struct l9p_request *req, const struct iovec *iov, size_t niov, - void *arg) +pci_vt9p_drop(struct l9p_request *req, const struct iovec *iov __unused, + size_t niov __unused, void *arg __unused) { struct pci_vt9p_request *preq = req->lr_aux; struct pci_vt9p_softc *sc = preq->vsr_sc; @@ -248,7 +248,7 @@ pci_vt9p_legacy_config(nvlist_t *nvl, const char *opts) } static int -pci_vt9p_init(struct vmctx *ctx, struct pci_devinst *pi, nvlist_t *nvl) +pci_vt9p_init(struct vmctx *ctx __unused, struct pci_devinst *pi, nvlist_t *nvl) { struct pci_vt9p_softc *sc; const char *value; diff --git a/usr.sbin/bhyve/pci_virtio_block.c b/usr.sbin/bhyve/pci_virtio_block.c index 8cdcbb777691..2b2e6a412a5a 100644 --- a/usr.sbin/bhyve/pci_virtio_block.c +++ b/usr.sbin/bhyve/pci_virtio_block.c @@ -437,7 +437,8 @@ pci_vtblk_notify(void *vsc, struct vqueue_info *vq) } static void -pci_vtblk_resized(struct blockif_ctxt *bctxt, void *arg, size_t new_size) +pci_vtblk_resized(struct blockif_ctxt *bctxt __unused, void *arg, + size_t new_size) { struct pci_vtblk_softc *sc; @@ -449,7 +450,8 @@ pci_vtblk_resized(struct blockif_ctxt *bctxt, void *arg, size_t new_size) } static int -pci_vtblk_init(struct vmctx *ctx, struct pci_devinst *pi, nvlist_t *nvl) +pci_vtblk_init(struct vmctx *ctx __unused, struct pci_devinst *pi, + nvlist_t *nvl) { char bident[sizeof("XX:X:X")]; struct blockif_ctxt *bctxt; @@ -565,7 +567,8 @@ pci_vtblk_init(struct vmctx *ctx, struct pci_devinst *pi, nvlist_t *nvl) } static int -pci_vtblk_cfgwrite(void *vsc, int offset, int size, uint32_t value) +pci_vtblk_cfgwrite(void *vsc __unused, int offset, int size __unused, + uint32_t value __unused) { DPRINTF(("vtblk: write to readonly reg %d", offset)); diff --git a/usr.sbin/bhyve/pci_virtio_console.c b/usr.sbin/bhyve/pci_virtio_console.c index 663ead8d165e..fa16bfb84d79 100644 --- a/usr.sbin/bhyve/pci_virtio_console.c +++ b/usr.sbin/bhyve/pci_virtio_console.c @@ -210,9 +210,9 @@ pci_vtcon_cfgread(void *vsc, int offset, int size, uint32_t *retval) } static int -pci_vtcon_cfgwrite(void *vsc, int offset, int size, uint32_t val) +pci_vtcon_cfgwrite(void *vsc __unused, int offset __unused, int size __unused, + uint32_t val __unused) { - return (0); } @@ -464,8 +464,8 @@ close: } static void -pci_vtcon_sock_tx(struct pci_vtcon_port *port, void *arg, struct iovec *iov, - int niov) +pci_vtcon_sock_tx(struct pci_vtcon_port *port __unused, void *arg __unused, + struct iovec *iov, int niov) { struct pci_vtcon_sock *sock; int i, ret; @@ -490,8 +490,8 @@ pci_vtcon_sock_tx(struct pci_vtcon_port *port, void *arg, struct iovec *iov, } static void -pci_vtcon_control_tx(struct pci_vtcon_port *port, void *arg, struct iovec *iov, - int niov) +pci_vtcon_control_tx(struct pci_vtcon_port *port, void *arg __unused, + struct iovec *iov, int niov) { struct pci_vtcon_softc *sc; struct pci_vtcon_port *tmp; @@ -684,7 +684,8 @@ pci_vtcon_legacy_config(nvlist_t *nvl, const char *opts) } static int -pci_vtcon_init(struct vmctx *ctx, struct pci_devinst *pi, nvlist_t *nvl) +pci_vtcon_init(struct vmctx *ctx __unused, struct pci_devinst *pi, + nvlist_t *nvl) { struct pci_vtcon_softc *sc; nvlist_t *ports_nvl; diff --git a/usr.sbin/bhyve/pci_virtio_input.c b/usr.sbin/bhyve/pci_virtio_input.c index e3d5264b8b22..758b228ea39c 100644 --- a/usr.sbin/bhyve/pci_virtio_input.c +++ b/usr.sbin/bhyve/pci_virtio_input.c @@ -178,7 +178,7 @@ pci_vtinput_reset(void *vsc) } static void -pci_vtinput_notify_eventq(void *vsc, struct vqueue_info *vq) +pci_vtinput_notify_eventq(void *vsc __unused, struct vqueue_info *vq __unused) { DPRINTF(("%s", __func__)); } @@ -639,7 +639,8 @@ pci_vtinput_legacy_config(nvlist_t *nvl, const char *opts) } static int -pci_vtinput_init(struct vmctx *ctx, struct pci_devinst *pi, nvlist_t *nvl) +pci_vtinput_init(struct vmctx *ctx __unused, struct pci_devinst *pi, + nvlist_t *nvl) { struct pci_vtinput_softc *sc; diff --git a/usr.sbin/bhyve/pci_virtio_net.c b/usr.sbin/bhyve/pci_virtio_net.c index 068a3f267b09..43e559b650c1 100644 --- a/usr.sbin/bhyve/pci_virtio_net.c +++ b/usr.sbin/bhyve/pci_virtio_net.c @@ -399,7 +399,7 @@ pci_vtnet_rx(struct pci_vtnet_softc *sc) * an entire ethernet frame + rx header. */ static void -pci_vtnet_rx_callback(int fd, enum ev_type type, void *param) +pci_vtnet_rx_callback(int fd __unused, enum ev_type type __unused, void *param) { struct pci_vtnet_softc *sc = param; @@ -560,7 +560,8 @@ pci_vtnet_ping_ctlq(void *vsc, struct vqueue_info *vq) #endif static int -pci_vtnet_init(struct vmctx *ctx, struct pci_devinst *pi, nvlist_t *nvl) +pci_vtnet_init(struct vmctx *ctx __unused, struct pci_devinst *pi, + nvlist_t *nvl) { struct pci_vtnet_softc *sc; const char *value; diff --git a/usr.sbin/bhyve/pci_virtio_rnd.c b/usr.sbin/bhyve/pci_virtio_rnd.c index 4049494177f9..416a1b605e9f 100644 --- a/usr.sbin/bhyve/pci_virtio_rnd.c +++ b/usr.sbin/bhyve/pci_virtio_rnd.c @@ -140,7 +140,8 @@ pci_vtrnd_notify(void *vsc, struct vqueue_info *vq) static int -pci_vtrnd_init(struct vmctx *ctx, struct pci_devinst *pi, nvlist_t *nvl) +pci_vtrnd_init(struct vmctx *ctx __unused, struct pci_devinst *pi, + nvlist_t *nvl __unused) { struct pci_vtrnd_softc *sc; int fd; diff --git a/usr.sbin/bhyve/pci_virtio_scsi.c b/usr.sbin/bhyve/pci_virtio_scsi.c index 235f96eca233..537b2a58097b 100644 --- a/usr.sbin/bhyve/pci_virtio_scsi.c +++ b/usr.sbin/bhyve/pci_virtio_scsi.c @@ -342,9 +342,9 @@ pci_vtscsi_cfgread(void *vsc, int offset, int size, uint32_t *retval) } static int -pci_vtscsi_cfgwrite(void *vsc, int offset, int size, uint32_t val) +pci_vtscsi_cfgwrite(void *vsc __unused, int offset __unused, int size __unused, + uint32_t val __unused) { - return (0); } @@ -459,10 +459,9 @@ pci_vtscsi_tmf_handle(struct pci_vtscsi_softc *sc, } static int -pci_vtscsi_an_handle(struct pci_vtscsi_softc *sc, - struct pci_vtscsi_ctrl_an *an) +pci_vtscsi_an_handle(struct pci_vtscsi_softc *sc __unused, + struct pci_vtscsi_ctrl_an *an __unused) { - return (0); } @@ -604,9 +603,8 @@ pci_vtscsi_controlq_notify(void *vsc, struct vqueue_info *vq) } static void -pci_vtscsi_eventq_notify(void *vsc, struct vqueue_info *vq) +pci_vtscsi_eventq_notify(void *vsc __unused, struct vqueue_info *vq) { - vq_kick_disable(vq); } @@ -698,7 +696,8 @@ pci_vtscsi_legacy_config(nvlist_t *nvl, const char *opts) } static int -pci_vtscsi_init(struct vmctx *ctx, struct pci_devinst *pi, nvlist_t *nvl) +pci_vtscsi_init(struct vmctx *ctx __unused, struct pci_devinst *pi, + nvlist_t *nvl) { struct pci_vtscsi_softc *sc; const char *devname, *value; diff --git a/usr.sbin/bhyve/pci_xhci.c b/usr.sbin/bhyve/pci_xhci.c index bea5095784a3..d0e4b0118602 100644 --- a/usr.sbin/bhyve/pci_xhci.c +++ b/usr.sbin/bhyve/pci_xhci.c @@ -1633,9 +1633,9 @@ pci_xhci_xfer_complete(struct pci_xhci_softc *sc, struct usb_data_xfer *xfer, } static void -pci_xhci_update_ep_ring(struct pci_xhci_softc *sc, struct pci_xhci_dev_emu *dev, - struct pci_xhci_dev_ep *devep, struct xhci_endp_ctx *ep_ctx, - uint32_t streamid, uint64_t ringaddr, int ccs) +pci_xhci_update_ep_ring(struct pci_xhci_softc *sc, + struct pci_xhci_dev_emu *dev __unused, struct pci_xhci_dev_ep *devep, + struct xhci_endp_ctx *ep_ctx, uint32_t streamid, uint64_t ringaddr, int ccs) { if (devep->ep_MaxPStreams != 0) { @@ -2251,8 +2251,9 @@ pci_xhci_hostop_write(struct pci_xhci_softc *sc, uint64_t offset, static void -pci_xhci_write(struct vmctx *ctx, int vcpu, struct pci_devinst *pi, - int baridx, uint64_t offset, int size, uint64_t value) +pci_xhci_write(struct vmctx *ctx __unused, int vcpu __unused, + struct pci_devinst *pi, int baridx, uint64_t offset, int size __unused, + uint64_t value) { struct pci_xhci_softc *sc; @@ -2385,9 +2386,9 @@ pci_xhci_hostop_read(struct pci_xhci_softc *sc, uint64_t offset) } static uint64_t -pci_xhci_dbregs_read(struct pci_xhci_softc *sc, uint64_t offset) +pci_xhci_dbregs_read(struct pci_xhci_softc *sc __unused, + uint64_t offset __unused) { - /* read doorbell always returns 0 */ return (0); } @@ -2472,8 +2473,8 @@ pci_xhci_xecp_read(struct pci_xhci_softc *sc, uint64_t offset) static uint64_t -pci_xhci_read(struct vmctx *ctx, int vcpu, struct pci_devinst *pi, int baridx, - uint64_t offset, int size) +pci_xhci_read(struct vmctx *ctx __unused, int vcpu __unused, + struct pci_devinst *pi, int baridx, uint64_t offset, int size) { struct pci_xhci_softc *sc; uint32_t value; @@ -2645,9 +2646,9 @@ done: } static int -pci_xhci_dev_event(struct usb_hci *hci, enum hci_usbev evid, void *param) +pci_xhci_dev_event(struct usb_hci *hci, enum hci_usbev evid __unused, + void *param __unused) { - DPRINTF(("xhci device event port %d", hci->hci_port)); return (0); } @@ -2841,7 +2842,7 @@ bad: } static int -pci_xhci_init(struct vmctx *ctx, struct pci_devinst *pi, nvlist_t *nvl) +pci_xhci_init(struct vmctx *ctx __unused, struct pci_devinst *pi, nvlist_t *nvl) { struct pci_xhci_softc *sc; int error; @@ -2955,8 +2956,8 @@ pci_xhci_map_devs_slots(struct pci_xhci_softc *sc, int maps[]) } static int -pci_xhci_snapshot_ep(struct pci_xhci_softc *sc, struct pci_xhci_dev_emu *dev, - int idx, struct vm_snapshot_meta *meta) +pci_xhci_snapshot_ep(struct pci_xhci_softc *sc __unused, + struct pci_xhci_dev_emu *dev, int idx, struct vm_snapshot_meta *meta) { int k; int ret; diff --git a/usr.sbin/bhyve/pctestdev.c b/usr.sbin/bhyve/pctestdev.c index 49e03b2a4343..d450d3cc977b 100644 --- a/usr.sbin/bhyve/pctestdev.c +++ b/usr.sbin/bhyve/pctestdev.c @@ -178,8 +178,8 @@ fail: } static int -pctestdev_debugexit_io(struct vmctx *ctx, int vcpu, int in, int port, - int bytes, uint32_t *eax, void *arg) +pctestdev_debugexit_io(struct vmctx *ctx __unused, int vcpu __unused, int in, + int port __unused, int bytes __unused, uint32_t *eax, void *arg __unused) { if (in) *eax = 0; @@ -190,8 +190,9 @@ pctestdev_debugexit_io(struct vmctx *ctx, int vcpu, int in, int port, } static int -pctestdev_iomem_io(struct vmctx *ctx, int vcpu, int dir, uint64_t addr, - int size, uint64_t *val, void *arg1, long arg2) +pctestdev_iomem_io(struct vmctx *ctx __unused, int vcpu __unused, int dir, + uint64_t addr, int size, uint64_t *val, void *arg1 __unused, + long arg2 __unused) { uint64_t offset; @@ -210,8 +211,8 @@ pctestdev_iomem_io(struct vmctx *ctx, int vcpu, int dir, uint64_t addr, } static int -pctestdev_ioport_io(struct vmctx *ctx, int vcpu, int in, int port, - int bytes, uint32_t *eax, void *arg) +pctestdev_ioport_io(struct vmctx *ctx __unused, int vcpu __unused, int in, + int port, int bytes, uint32_t *eax, void *arg __unused) { uint32_t mask; int lsb; @@ -233,8 +234,8 @@ pctestdev_ioport_io(struct vmctx *ctx, int vcpu, int in, int port, } static int -pctestdev_irq_io(struct vmctx *ctx, int vcpu, int in, int port, int bytes, - uint32_t *eax, void *arg) +pctestdev_irq_io(struct vmctx *ctx, int vcpu __unused, int in, int port, + int bytes, uint32_t *eax, void *arg __unused) { int irq; diff --git a/usr.sbin/bhyve/pm.c b/usr.sbin/bhyve/pm.c index 9f467cb591e8..e8967c1b342c 100644 --- a/usr.sbin/bhyve/pm.c +++ b/usr.sbin/bhyve/pm.c @@ -60,8 +60,8 @@ static const unsigned gpe0_valid = (1u << GPE_VMGENC); * reset. */ static int -reset_handler(struct vmctx *ctx, int vcpu, int in, int port, int bytes, - uint32_t *eax, void *arg) +reset_handler(struct vmctx *ctx __unused, int vcpu __unused, int in, + int port __unused, int bytes, uint32_t *eax, void *arg __unused) { int error; @@ -158,8 +158,8 @@ sci_update(struct vmctx *ctx) } static int -pm1_status_handler(struct vmctx *ctx, int vcpu, int in, int port, int bytes, - uint32_t *eax, void *arg) +pm1_status_handler(struct vmctx *ctx, int vcpu __unused, int in, + int port __unused, int bytes, uint32_t *eax, void *arg __unused) { if (bytes != 2) @@ -182,8 +182,8 @@ pm1_status_handler(struct vmctx *ctx, int vcpu, int in, int port, int bytes, } static int -pm1_enable_handler(struct vmctx *ctx, int vcpu, int in, int port, int bytes, - uint32_t *eax, void *arg) +pm1_enable_handler(struct vmctx *ctx, int vcpu __unused, int in, + int port __unused, int bytes, uint32_t *eax, void *arg __unused) { if (bytes != 2) @@ -208,7 +208,7 @@ INOUT_PORT(pm1_status, PM1A_EVT_ADDR, IOPORT_F_INOUT, pm1_status_handler); INOUT_PORT(pm1_enable, PM1A_EVT_ADDR + 2, IOPORT_F_INOUT, pm1_enable_handler); static void -power_button_handler(int signal, enum ev_type type, void *arg) +power_button_handler(int signal __unused, enum ev_type type __unused, void *arg) { struct vmctx *ctx; @@ -235,8 +235,8 @@ static uint16_t pm1_control; #define PM1_ALWAYS_ZERO 0xc003 static int -pm1_control_handler(struct vmctx *ctx, int vcpu, int in, int port, int bytes, - uint32_t *eax, void *arg) +pm1_control_handler(struct vmctx *ctx, int vcpu __unused, int in, + int port __unused, int bytes, uint32_t *eax, void *arg __unused) { int error; @@ -285,8 +285,8 @@ acpi_raise_gpe(struct vmctx *ctx, unsigned bit) } static int -gpe0_sts(struct vmctx *ctx, int vcpu, int in, int port, int bytes, - uint32_t *eax, void *arg) +gpe0_sts(struct vmctx *ctx, int vcpu __unused, int in, int port __unused, + int bytes, uint32_t *eax, void *arg __unused) { /* * ACPI 6.2 specifies the GPE register blocks are accessed @@ -309,8 +309,8 @@ gpe0_sts(struct vmctx *ctx, int vcpu, int in, int port, int bytes, INOUT_PORT(gpe0_sts, IO_GPE0_STS, IOPORT_F_INOUT, gpe0_sts); static int -gpe0_en(struct vmctx *ctx, int vcpu, int in, int port, int bytes, - uint32_t *eax, void *arg) +gpe0_en(struct vmctx *ctx, int vcpu __unused, int in, int port __unused, + int bytes, uint32_t *eax, void *arg __unused) { if (bytes != 1) return (-1); @@ -333,8 +333,8 @@ INOUT_PORT(gpe0_en, IO_GPE0_EN, IOPORT_F_INOUT, gpe0_en); * This write-only register is used to enable and disable ACPI. */ static int -smi_cmd_handler(struct vmctx *ctx, int vcpu, int in, int port, int bytes, - uint32_t *eax, void *arg) +smi_cmd_handler(struct vmctx *ctx, int vcpu __unused, int in, int port __unused, + int bytes, uint32_t *eax, void *arg __unused) { assert(!in); diff --git a/usr.sbin/bhyve/post.c b/usr.sbin/bhyve/post.c index d3040a8df76f..a16eaa074f96 100644 --- a/usr.sbin/bhyve/post.c +++ b/usr.sbin/bhyve/post.c @@ -39,8 +39,8 @@ __FBSDID("$FreeBSD$"); #include "pci_lpc.h" static int -post_data_handler(struct vmctx *ctx, int vcpu, int in, int port, int bytes, - uint32_t *eax, void *arg) +post_data_handler(struct vmctx *ctx __unused, int vcpu __unused, int in, + int port __unused, int bytes, uint32_t *eax, void *arg __unused) { assert(in == 1); diff --git a/usr.sbin/bhyve/rfb.c b/usr.sbin/bhyve/rfb.c index 88094a4f461f..ad5fc4fc88e0 100644 --- a/usr.sbin/bhyve/rfb.c +++ b/usr.sbin/bhyve/rfb.c @@ -318,14 +318,13 @@ rfb_send_extended_keyevent_update_msg(struct rfb_softc *rc, int cfd) } static void -rfb_recv_set_pixfmt_msg(struct rfb_softc *rc, int cfd) +rfb_recv_set_pixfmt_msg(struct rfb_softc *rc __unused, int cfd) { struct rfb_pixfmt_msg pixfmt_msg; (void)stream_read(cfd, ((void *)&pixfmt_msg)+1, sizeof(pixfmt_msg)-1); } - static void rfb_recv_set_encodings_msg(struct rfb_softc *rc, int cfd) { @@ -379,7 +378,7 @@ fast_crc32(void *buf, int len, uint32_t crcval) } static int -rfb_send_update_header(struct rfb_softc *rc, int cfd, int numrects) +rfb_send_update_header(struct rfb_softc *rc __unused, int cfd, int numrects) { struct rfb_srvr_updt_msg supdt_msg; @@ -778,7 +777,7 @@ rfb_recv_ptr_msg(struct rfb_softc *rc, int cfd) } static void -rfb_recv_cuttext_msg(struct rfb_softc *rc, int cfd) +rfb_recv_cuttext_msg(struct rfb_softc *rc __unused, int cfd) { struct rfb_cuttext_msg ct_msg; unsigned char buf[32]; diff --git a/usr.sbin/bhyve/rtc.c b/usr.sbin/bhyve/rtc.c index 9125b4f86a10..3c0429e547af 100644 --- a/usr.sbin/bhyve/rtc.c +++ b/usr.sbin/bhyve/rtc.c @@ -60,7 +60,7 @@ __FBSDID("$FreeBSD$"); * Returns the current RTC time as number of seconds since 00:00:00 Jan 1, 1970 */ static time_t -rtc_time(struct vmctx *ctx) +rtc_time(void) { struct tm tm; time_t t; @@ -102,7 +102,7 @@ rtc_init(struct vmctx *ctx) err = vm_rtc_write(ctx, RTC_HMEM_MSB, himem >> 16); assert(err == 0); - err = vm_rtc_settime(ctx, rtc_time(ctx)); + err = vm_rtc_settime(ctx, rtc_time()); assert(err == 0); } diff --git a/usr.sbin/bhyve/snapshot.c b/usr.sbin/bhyve/snapshot.c index 37486ba368e3..1ca36432fc08 100644 --- a/usr.sbin/bhyve/snapshot.c +++ b/usr.sbin/bhyve/snapshot.c @@ -601,7 +601,7 @@ lookup_guest_ncpus(struct restore_state *rstate) } static void -winch_handler(int signal) +winch_handler(int signal __unused) { #ifdef TIOCGWINSZ ioctl(STDOUT_FILENO, TIOCGWINSZ, &winsize); diff --git a/usr.sbin/bhyve/usb_mouse.c b/usr.sbin/bhyve/usb_mouse.c index fbda9ef2579b..fae7f4c29fa7 100644 --- a/usr.sbin/bhyve/usb_mouse.c +++ b/usr.sbin/bhyve/usb_mouse.c @@ -297,7 +297,7 @@ umouse_event(uint8_t button, int x, int y, void *arg) } static void * -umouse_init(struct usb_hci *hci, nvlist_t *nvl) +umouse_init(struct usb_hci *hci, nvlist_t *nvl __unused) { struct umouse_softc *sc; @@ -774,16 +774,14 @@ umouse_reset(void *scarg) } static int -umouse_remove(void *scarg) +umouse_remove(void *scarg __unused) { - return (0); } static int -umouse_stop(void *scarg) +umouse_stop(void *scarg __unused) { - return (0); } diff --git a/usr.sbin/bhyve/vga.c b/usr.sbin/bhyve/vga.c index 24864f32e8b9..cd42e2a9e4cf 100644 --- a/usr.sbin/bhyve/vga.c +++ b/usr.sbin/bhyve/vga.c @@ -339,7 +339,7 @@ vga_render(struct bhyvegc *gc, void *arg) } static uint64_t -vga_mem_rd_handler(struct vmctx *ctx, uint64_t addr, void *arg1) +vga_mem_rd_handler(struct vmctx *ctx __unused, uint64_t addr, void *arg1) { struct vga_softc *sc = arg1; uint8_t map_sel; @@ -399,7 +399,8 @@ vga_mem_rd_handler(struct vmctx *ctx, uint64_t addr, void *arg1) } static void -vga_mem_wr_handler(struct vmctx *ctx, uint64_t addr, uint8_t val, void *arg1) +vga_mem_wr_handler(struct vmctx *ctx __unused, uint64_t addr, uint8_t val, + void *arg1) { struct vga_softc *sc = arg1; uint8_t c0, c1, c2, c3; @@ -653,8 +654,8 @@ vga_mem_wr_handler(struct vmctx *ctx, uint64_t addr, uint8_t val, void *arg1) } static int -vga_mem_handler(struct vmctx *ctx, int vcpu, int dir, uint64_t addr, - int size, uint64_t *val, void *arg1, long arg2) +vga_mem_handler(struct vmctx *ctx, int vcpu __unused, int dir, uint64_t addr, + int size, uint64_t *val, void *arg1, long arg2 __unused) { if (dir == MEM_F_WRITE) { switch (size) { @@ -714,8 +715,8 @@ vga_mem_handler(struct vmctx *ctx, int vcpu, int dir, uint64_t addr, } static int -vga_port_in_handler(struct vmctx *ctx, int in, int port, int bytes, - uint8_t *val, void *arg) +vga_port_in_handler(struct vmctx *ctx __unused, int in __unused, int port, + int bytes __unused, uint8_t *val, void *arg) { struct vga_softc *sc = arg; @@ -941,8 +942,8 @@ vga_port_in_handler(struct vmctx *ctx, int in, int port, int bytes, } static int -vga_port_out_handler(struct vmctx *ctx, int in, int port, int bytes, - uint8_t val, void *arg) +vga_port_out_handler(struct vmctx *ctx __unused, int in __unused, int port, + int bytes __unused, uint8_t val, void *arg) { struct vga_softc *sc = arg; @@ -1214,8 +1215,8 @@ vga_port_out_handler(struct vmctx *ctx, int in, int port, int bytes, } static int -vga_port_handler(struct vmctx *ctx, int vcpu, int in, int port, int bytes, - uint32_t *eax, void *arg) +vga_port_handler(struct vmctx *ctx, int vcpu __unused, int in, int port, + int bytes, uint32_t *eax, void *arg) { uint8_t val; int error; diff --git a/usr.sbin/bhyve/virtio.c b/usr.sbin/bhyve/virtio.c index 23cf6a2c0c7c..d16371deb40d 100644 --- a/usr.sbin/bhyve/virtio.c +++ b/usr.sbin/bhyve/virtio.c @@ -559,8 +559,8 @@ vi_find_cr(int offset) { * Otherwise dispatch to the actual driver. */ uint64_t -vi_pci_read(struct vmctx *ctx, int vcpu, struct pci_devinst *pi, - int baridx, uint64_t offset, int size) +vi_pci_read(struct vmctx *ctx __unused, int vcpu __unused, + struct pci_devinst *pi, int baridx, uint64_t offset, int size) { struct virtio_softc *vs = pi->pi_arg; struct virtio_consts *vc; @@ -679,8 +679,9 @@ done: * Otherwise dispatch to the actual driver. */ void -vi_pci_write(struct vmctx *ctx, int vcpu, struct pci_devinst *pi, - int baridx, uint64_t offset, int size, uint64_t value) +vi_pci_write(struct vmctx *ctx __unused, int vcpu __unused, + struct pci_devinst *pi, int baridx, uint64_t offset, int size, + uint64_t value) { struct virtio_softc *vs = pi->pi_arg; struct vqueue_info *vq; @@ -815,7 +816,7 @@ done: #ifdef BHYVE_SNAPSHOT int -vi_pci_pause(struct vmctx *ctx, struct pci_devinst *pi) +vi_pci_pause(struct vmctx *ctx __unused, struct pci_devinst *pi) { struct virtio_softc *vs; struct virtio_consts *vc; @@ -831,7 +832,7 @@ vi_pci_pause(struct vmctx *ctx, struct pci_devinst *pi) } int -vi_pci_resume(struct vmctx *ctx, struct pci_devinst *pi) +vi_pci_resume(struct vmctx *ctx __unused, struct pci_devinst *pi) { struct virtio_softc *vs; struct virtio_consts *vc; diff --git a/usr.sbin/bhyve/xmsr.c b/usr.sbin/bhyve/xmsr.c index 1a7f98ee222a..563743dd05b4 100644 --- a/usr.sbin/bhyve/xmsr.c +++ b/usr.sbin/bhyve/xmsr.c @@ -49,7 +49,8 @@ __FBSDID("$FreeBSD$"); static int cpu_vendor_intel, cpu_vendor_amd, cpu_vendor_hygon; int -emulate_wrmsr(struct vmctx *ctx, int vcpu, uint32_t num, uint64_t val) +emulate_wrmsr(struct vmctx *ctx __unused, int vcpu __unused, uint32_t num, + uint64_t val __unused) { if (cpu_vendor_intel) { @@ -103,7 +104,8 @@ emulate_wrmsr(struct vmctx *ctx, int vcpu, uint32_t num, uint64_t val) } int -emulate_rdmsr(struct vmctx *ctx, int vcpu, uint32_t num, uint64_t *val) +emulate_rdmsr(struct vmctx *ctx __unused, int vcpu __unused, uint32_t num, + uint64_t *val) { int error = 0; |