diff --git a/usr.sbin/bhyve/pci_hda.c b/usr.sbin/bhyve/pci_hda.c index 9e9d7ab5a626..07b0e745b0b9 100644 --- a/usr.sbin/bhyve/pci_hda.c +++ b/usr.sbin/bhyve/pci_hda.c @@ -726,17 +726,19 @@ hda_write(struct hda_softc *sc, uint32_t offset, uint8_t size, uint32_t value) return (0); } +#if DEBUG_HDA == 1 static inline void hda_print_cmd_ctl_data(struct hda_codec_cmd_ctl *p) { -#if DEBUG_HDA == 1 - const char *name = p->name; -#endif - DPRINTF("%s size: %d", name, p->size); - DPRINTF("%s dma_vaddr: %p", name, p->dma_vaddr); - DPRINTF("%s wp: 0x%x", name, p->wp); - DPRINTF("%s rp: 0x%x", name, p->rp); + DPRINTF("%s size: %d", p->name, p->size); + DPRINTF("%s dma_vaddr: %p", p->name, p->dma_vaddr); + DPRINTF("%s wp: 0x%x", p->name, p->wp); + DPRINTF("%s rp: 0x%x", p->name, p->rp); } +#else +static inline void +hda_print_cmd_ctl_data(struct hda_codec_cmd_ctl *p __unused) {} +#endif static int hda_corb_start(struct hda_softc *sc) diff --git a/usr.sbin/bhyve/pci_hda.h b/usr.sbin/bhyve/pci_hda.h index 12d80a92f60a..8b24afac4771 100644 --- a/usr.sbin/bhyve/pci_hda.h +++ b/usr.sbin/bhyve/pci_hda.h @@ -46,7 +46,6 @@ /* * HDA Debug Log */ -#define DEBUG_HDA 1 #if DEBUG_HDA == 1 extern FILE *dbg; #define DPRINTF(fmt, arg...) \