Mark cfg as __unused to avoid ifdef soup

Sponsored by:		Netflix
This commit is contained in:
Warner Losh 2022-04-04 20:11:40 -06:00
parent 273676a44c
commit 09b966ee7c

View file

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