summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authorngie <ngie@FreeBSD.org>2016-07-06 04:58:42 +0000
committerngie <ngie@FreeBSD.org>2016-07-06 04:58:42 +0000
commit67d615a1f296347408f41984ec2671d975031716 (patch)
treebfa9792576d073bee9510a416359c769b017001f /usr.sbin
parentd42209a81dd8bbf6d9ff9b9de9874cbaaeb86038 (diff)
downloadFreeBSD-src-67d615a1f296347408f41984ec2671d975031716.zip
FreeBSD-src-67d615a1f296347408f41984ec2671d975031716.tar.gz
Fix gcc warnings
Put cfl/prdt under AHCI_DEBUG #defines as they are only used in those cases. Approved by: re (gjb) Differential Revision: https://reviews.freebsd.org/D7119 MFC after: 1 week Reported by: Jenkins Reviewed by: grehan (maintainer) Sponsored by: EMC / Isilon Storage Division
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/bhyve/pci_ahci.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/usr.sbin/bhyve/pci_ahci.c b/usr.sbin/bhyve/pci_ahci.c
index 9acb0da..1cf6f10 100644
--- a/usr.sbin/bhyve/pci_ahci.c
+++ b/usr.sbin/bhyve/pci_ahci.c
@@ -1717,19 +1717,25 @@ static void
ahci_handle_slot(struct ahci_port *p, int slot)
{
struct ahci_cmd_hdr *hdr;
+#ifdef AHCI_DEBUG
struct ahci_prdt_entry *prdt;
+#endif
struct pci_ahci_softc *sc;
uint8_t *cfis;
+#ifdef AHCI_DEBUG
int cfl;
+#endif
sc = p->pr_sc;
hdr = (struct ahci_cmd_hdr *)(p->cmd_lst + slot * AHCI_CL_SIZE);
+#ifdef AHCI_DEBUG
cfl = (hdr->flags & 0x1f) * 4;
+#endif
cfis = paddr_guest2host(ahci_ctx(sc), hdr->ctba,
0x80 + hdr->prdtl * sizeof(struct ahci_prdt_entry));
+#ifdef AHCI_DEBUG
prdt = (struct ahci_prdt_entry *)(cfis + 0x80);
-#ifdef AHCI_DEBUG
DPRINTF("\ncfis:");
for (i = 0; i < cfl; i++) {
if (i % 10 == 0)
OpenPOWER on IntegriCloud