From 09b966ee7c6389db635f793377cc50cb2fcb4962 Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Mon, 4 Apr 2022 20:11:40 -0600 Subject: [PATCH] Mark cfg as __unused to avoid ifdef soup Sponsored by: Netflix --- sys/dev/pci/pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c index 6f3bae13d79..535d4f6f3f3 100644 --- a/sys/dev/pci/pci.c +++ b/sys/dev/pci/pci.c @@ -5645,7 +5645,7 @@ pci_release_resource(device_t dev, device_t child, int type, int rid, { struct pci_devinfo *dinfo; struct resource_list *rl; - pcicfgregs *cfg; + pcicfgregs *cfg __unused; if (device_get_parent(child) != dev) return (BUS_RELEASE_RESOURCE(device_get_parent(dev), child, @@ -5655,7 +5655,7 @@ pci_release_resource(device_t dev, device_t child, int type, int rid, cfg = &dinfo->cfg; #ifdef PCI_IOV - if (dinfo->cfg.flags & PCICFG_VF) { + if (cfg->flags & PCICFG_VF) { switch (type) { /* VFs can't have I/O BARs. */ case SYS_RES_IOPORT: