bhyve: Disable bhyve HDA debug by default.

Adapt hda_print_cmd_ctl_data() to not generate compiler warnings
when DEBUG_HDA is off.

Reviewed by:		corvink
Approved by:		corvink
Differential Revision:	https://reviews.freebsd.org/D39826
This commit is contained in:
Guido Falsi 2023-04-03 12:45:11 +02:00
parent 087a2e64ba
commit 03d3124629
2 changed files with 9 additions and 8 deletions

View File

@ -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)

View File

@ -46,7 +46,6 @@
/*
* HDA Debug Log
*/
#define DEBUG_HDA 1
#if DEBUG_HDA == 1
extern FILE *dbg;
#define DPRINTF(fmt, arg...) \